{"nbformat":4,"nbformat_minor":0,"metadata":{"kernelspec":{"name":"python3","display_name":"Python 3","language":"python"},"language_info":{"name":"python","version":"3.7.6","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"colab":{"name":"notebook.ipynb","provenance":[],"collapsed_sections":["Q3ZWCD_mdgQ2","ZA43rGIydgQ6","_4o4vEnTdgQ-","PZtRMK2pdgRH","SCoSsHy5dgRK","JWEm532hdgRM","NC9FvtdDdgRV","Pn81iQy1dgRX","Vk_xT6O2dgRY","oGOtZ5indgRh"]}},"cells":[{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"UFDoL943egAA","executionInfo":{"status":"ok","timestamp":1631002944870,"user_tz":-120,"elapsed":33902,"user":{"displayName":"Marco Postiglione","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GgH4oMfyAUOoZeTaaDGC3Vi_LS5mtbEoPeSRbcTpg=s64","userId":"12968427818961586378"}},"outputId":"681695df-3adf-4584-d5dd-7c94ebb8e32c"},"source":["from google.colab import drive\n","drive.mount('/content/drive')"],"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Mounted at /content/drive\n"]}]},{"cell_type":"code","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true,"id":"QHgoyB41dgQt"},"source":["import numpy as np # linear algebra\n","import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","trusted":true,"id":"8RC-C_RddgQ1"},"source":["import pandas as pd\n","import datetime\n","import numpy as np\n","import time as time\n","import pickle\n","from sklearn.utils import shuffle\n","import seaborn as sns\n","import matplotlib.pyplot as plt\n","import random\n","import networkx as nx\n","from sklearn.metrics import classification_report\n","from tqdm import tqdm\n","tqdm.pandas()\n","\n","from IPython.display import HTML, display\n","import time\n","\n","def progress(value, max=100):\n","    return HTML(\"\"\"\n","        <progress\n","            value='{value}'\n","            max='{max}',\n","            style='width: 100%'\n","        >\n","            {value}\n","        </progress>\n","    \"\"\".format(value=value, max=max))"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"Q3ZWCD_mdgQ2"},"source":["# CSV Loading"]},{"cell_type":"code","metadata":{"trusted":true,"id":"hi6s6KrddgQ4"},"source":["song_data = pd.read_csv(\"drive/MyDrive/TESI MIRKO/songs_final.csv\")\n","user_data = pd.read_csv(\"drive/MyDrive/TESI MIRKO//user_data_final.csv\")"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"GLz5ydxidgQ5"},"source":["# tolgo dalle canzoni totali quelle senza dati di ascolto (0 listenings)\n","listened_songs = user_data[\"song_id\"].drop_duplicates()\n","song_data = song_data[song_data[\"song_id\"].isin(listened_songs)]"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"ZA43rGIydgQ6"},"source":["# User data splitting"]},{"cell_type":"code","metadata":{"trusted":true,"id":"1ich_sTodgQ7"},"source":["# write dict\n","set_dict = {}\n","\n","def add_to_dict(key, value):\n","    #print(key)\n","    set_dict[key] = value\n","\n","def train_test_set(x):\n","    if len(x)<5:\n","        x.apply(lambda y: add_to_dict(y[\"triple_id\"], \"train\"), axis=1)\n","    else:\n","        x = x.sample(frac=1)\n","        train_set = x.head(int(round(len(x)*(0.8))))\n","        train_set.apply(lambda y: add_to_dict(y[\"triple_id\"], \"train\"), axis=1)\n","        test_set = x.tail(int(round(len(x)*(0.2))))\n","        test_set.apply(lambda y: add_to_dict(y[\"triple_id\"], \"test\"), axis=1)\n","\n","# user_data.groupby('user').progress_apply(train_test_set)"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"nqY0kW4tdgQ-"},"source":["# load csv justpartitioned\n","user_data_total = pd.read_csv(\"drive/MyDrive/TESI MIRKO/user_data_partitioned_val.csv\")\n","# user_data_total = user_data"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"v1vNkEk7dgQ-"},"source":["# load training data labels\n","user_data = user_data_total[user_data_total[\"set\"]!=\"test\"]"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"_4o4vEnTdgQ-"},"source":["# Creazione ipergrafo"]},{"cell_type":"code","metadata":{"trusted":true,"id":"rkkGcbctdgQ_"},"source":["# dataframe with listend songs\n","\n","user_hyperedges = user_data.groupby('user')['song_id'].apply(list).reset_index(name='songs')\n","user_hyperedges[\"user_id\"] = \"u_\"+(user_hyperedges.index.map(str))\n","user_hyperedges[\"user_id_matrix\"] = user_hyperedges.index"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"id":"LiOavIYylfb7"},"source":["# add new user ids and data\n","user_data = user_data.merge(user_hyperedges, on=\"user\", how=\"left\").set_index(user_data.columns.values[0])\n","user_data = user_data[[\"user_id\",\"user_id_matrix\",\"song_id\",\"play_count\",\"triple_id\",\"set\"]]\n","# user_data = user_data[[\"user\",\"user_id\",\"user_id_matrix\",\"song_id\",\"play_count\",\"triple_id\",\"set\"]]"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"h4_e8nbtdgQ_","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1631003105090,"user_tz":-120,"elapsed":371,"user":{"displayName":"Marco Postiglione","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GgH4oMfyAUOoZeTaaDGC3Vi_LS5mtbEoPeSRbcTpg=s64","userId":"12968427818961586378"}},"outputId":"29daa476-d05e-499f-a0c3-d3f0db687a79"},"source":["# dataframe per releases\n","\n","release_hyperedges = song_data.groupby(['artist_name','release'])['song_id'].apply(list).reset_index(name='songs')\n","release_hyperedges[\"release_id\"] = \"r_\"+(release_hyperedges.index.map(str))\n","print(release_hyperedges)"],"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["                                       artist_name  ... release_id\n","0                                     'Til Tuesday  ...        r_0\n","1                                    ...And Oceans  ...        r_1\n","2     ...And You Will Know Us By The Trail Of Dead  ...        r_2\n","3     ...And You Will Know Us By The Trail Of Dead  ...        r_3\n","4                                         10 Years  ...        r_4\n","...                                            ...  ...        ...\n","5950                          the bird and the bee  ...     r_5950\n","5951                          the bird and the bee  ...     r_5951\n","5952                          the bird and the bee  ...     r_5952\n","5953                                     zebrahead  ...     r_5953\n","5954                                     zebrahead  ...     r_5954\n","\n","[5955 rows x 4 columns]\n"]}]},{"cell_type":"code","metadata":{"trusted":true,"id":"juT7Np79dgRA","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1631003105091,"user_tz":-120,"elapsed":6,"user":{"displayName":"Marco Postiglione","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GgH4oMfyAUOoZeTaaDGC3Vi_LS5mtbEoPeSRbcTpg=s64","userId":"12968427818961586378"}},"outputId":"09337bb5-895b-4840-fe17-515ff2dc1440"},"source":["# dataframe per artists\n","\n","artists_hyperedges = song_data.groupby('artist_name')['song_id'].apply(list).reset_index(name='songs')\n","artists_hyperedges[\"artist_id\"] = \"a_\"+(artists_hyperedges.index.map(str))\n","print(artists_hyperedges)"],"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["                                       artist_name  ... artist_id\n","0                                     'Til Tuesday  ...       a_0\n","1                                    ...And Oceans  ...       a_1\n","2     ...And You Will Know Us By The Trail Of Dead  ...       a_2\n","3                                         10 Years  ...       a_3\n","4                                    10000 Maniacs  ...       a_4\n","...                                            ...  ...       ...\n","2897                                          moe.  ...    a_2897\n","2898                                    rinôçérôse  ...    a_2898\n","2899                                  silent force  ...    a_2899\n","2900                          the bird and the bee  ...    a_2900\n","2901                                     zebrahead  ...    a_2901\n","\n","[2902 rows x 3 columns]\n"]}]},{"cell_type":"code","metadata":{"trusted":true,"id":"1rDcXXnjdgRA","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1631003109858,"user_tz":-120,"elapsed":4772,"user":{"displayName":"Marco Postiglione","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GgH4oMfyAUOoZeTaaDGC3Vi_LS5mtbEoPeSRbcTpg=s64","userId":"12968427818961586378"}},"outputId":"09d01707-88cb-473c-f6e1-f27c67b881ea"},"source":["# dataframe per tag\n","\n","tags_hyperedges = pd.DataFrame(columns=[\"tag\",\"tag_id\",\"songs\"])\n","\n","tag_dict = {}\n","\n","def add_tag_edges(tag_song_row):\n","    tags = eval(tag_song_row[1])\n","    for tag in tags:\n","        if tag_dict.get(tag) == None:\n","            tag_dict[tag] = {}\n","            tag_dict[tag][\"songs\"] = []\n","            tag_dict[tag][\"tag_id\"] = \"t_\" + str(len(tag_dict)-1)\n","        tag_dict[tag][\"songs\"].append(tag_song_row[0])\n","        \n","song_data[[\"song_id\", \"tags\"]].apply(add_tag_edges, axis=1)\n","                    \n","print(tag_dict[\"emo\"])"],"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["{'songs': ['SOWWQXA12A81C1F9CA', 'SOHGWZL12A6D4FA43C', 'SOQZZOG12A8C1327A1', 'SOAXATS12A8C13F6D4', 'SOYDERO12A6D4F72BC', 'SONMWXV12AB01803B4', 'SODCBAA12A6D4FB161', 'SOPISCV12A8C141E97', 'SOFVHFL12A6D4F7B77', 'SOPZPTB12A8C13B8E2', 'SODNRDS12A8C13B8FB', 'SOTNOZN12A8C13D71E', 'SOUTGUB12AB017DC5B', 'SOYVAYO12A67AE17EA', 'SOYJIYN12A8C1345E9', 'SOMOKCH12A8159E8A0', 'SOOQQDQ12A8AE47CA9', 'SOEWXIQ12A6D4FA43E', 'SOPUWDQ12A8C13EB11', 'SOVUZFR12AF72A7A6B', 'SOHHHQS12AC9075465', 'SOPPPGZ12A6D4FD258', 'SONFKXT12AB0187C95', 'SOLQGJA12A6310DF4E', 'SODTRQE12AB017FEAC', 'SOEJMDR12A58A7E62A', 'SONULCN12AB017F8F9', 'SOHSVAE12A8C13E698', 'SOYECAU12A67021CC9', 'SOAFNMY12AB017FB32', 'SOCGVMO12A67AE24CC', 'SORJSEC12A6D4FA5E3', 'SOPKWEY12A67020C3B', 'SOFYXUS12A58A7B5A8', 'SOZBLGH12A670215FA', 'SOBOVPR12A58A7AA8E', 'SOJPQMP12A8C13B376', 'SOIHBCH12A6D4F7CAD', 'SODAABQ12AF72AD08C', 'SOOQBJF12A6D4FA8CA', 'SOGQMYP12A6D4F85AE', 'SOLCPEJ12AB017EDB6', 'SOFPZCI12A58A7CF79', 'SOOMVIQ12A3F1EA127', 'SOVOBOF12A6D4F6612', 'SOZVQTR12A67ADE67B', 'SOAKZZS12AB018B67B', 'SOTSLEU12A6D4F8639', 'SOMLSJU12A6D4F9CA1', 'SOJXAMZ12AF72ABD3C', 'SOOJJCT12A6310E1C0', 'SOVZSCE12B0B806C00', 'SOFJJZD12A8C13C7E5', 'SOTBJFK12A8151CDE3', 'SOOTKGC12A6D4F7804', 'SOTEMRY12A8C1436B3', 'SORVVWJ12A8C144EC5', 'SOAUQVI12A6D4F7A48', 'SOBNQLS12A8C13F94F', 'SOQCAHY12A8C132F1A', 'SOZHGMS12A8C132DA5', 'SOWRRCE12A6310F10B', 'SOAPAIB12AB018222C', 'SOWTLYJ12A8C13BC7C', 'SORGUUC12AB01846AD', 'SOXTBGF12A6D4FB49C', 'SOKLAXF12A6D4F58EC', 'SOAPSUA12A6701D952', 'SOPGVLN12A81C21840', 'SOWEHVT12A8C13DD2D', 'SOSURTI12A81C22FB8', 'SOENLZJ12A6701C91B', 'SOVNDAT12A8BEEEAEA', 'SOVVWYN12A58A7B018', 'SOXQOPN12A67020649', 'SOSIKDP12A58A799D2', 'SOEDXFM12A8C1459E9', 'SOCBDPR12A6701F792', 'SORMZTS12A8C13B869', 'SOEPLYX12A67021CE5', 'SOZHTBG12A6310F10F', 'SOEIMLT12A6310F177', 'SOTEOST12A6D4F9414', 'SOWHZCY12A67ADB31D', 'SOOCUJF12A8C1432B9', 'SOFRGUG12A6D4F7A41', 'SOISUWI12A6D4F5708', 'SOWCYFL12AB017F3F2', 'SOGHPKV12AB017F657', 'SOOKGQL12A8C141506', 'SOIBLIY12A6701FC42', 'SOINSCE12A6310D89D', 'SOTIDKX12A6D4FA7EA', 'SOOTVVU12A81C2394C', 'SOICWLD12A67AE1107', 'SOFKBBA12B0B806617', 'SOVNWCC12A6D4F9979', 'SOWPLVJ12AB0183586', 'SOLJDSG12A6D4F79B4', 'SOKREGA12A6D4FA45B', 'SOUVYLA12A58A7A132', 'SOOALAI12AF72AA613', 'SOLJDLJ12A8C138059', 'SOXUYUZ12A8C13A67E', 'SOVQKUG12A58A79726', 'SOPXNZK12A8C13B49D', 'SORJGDF12AB0181020', 'SOMKWXN12AF72A94C0', 'SOKLVHU12A6D4F4778', 'SOUEBPR12AAF3B53FC', 'SODWQTC12A6D4F81BE', 'SOSCDWJ12A6701F1D9', 'SOUELHW12A58A7EE46', 'SOAVPFU12A8C140FCC', 'SOTCJDZ12AB017FC3F', 'SOQNGHL12A813568AD', 'SODERSK12A8C136D67', 'SORLJFU12A6D4FB880', 'SOIPYPB12A8C1360D4', 'SOWLFSO12AF72A4C76', 'SOONUTJ12A6701D7B4', 'SOAEDLD12A8C139B8C', 'SOEKFTA12AF72A2FC7', 'SONLQFN12A8C13258A', 'SOKGSVI12AB01877C9', 'SOGTIXL12A6701C5D6', 'SOEZMOD12A8C136CC7', 'SOOQPIK12A6701F1C5', 'SOVHQUW12A6D4F5907', 'SOYCDUS12AB0183420', 'SOXWHSF12A8C13C60A', 'SOBARLM12A8C13781C', 'SOCKKEN12A8C1430CC', 'SOWZJLW12A8C13EB2A', 'SOSYZVP12AF729A6FD', 'SOBBJKR12A6D4FA788', 'SOMBSGK12A6D4F9715', 'SOTEIQI12A8C1352DE', 'SOGQJHN12AB017F870', 'SOJXXXQ12A6D4FAA69', 'SOZRCQH12AB01808D8', 'SOTMTVD12AF72A466A', 'SOMTLPL12A6702085A', 'SOAPBTS12AF729BFB8', 'SOIVTJW12A58A7DB88', 'SOAUBGU12A6701C57A', 'SOCAKHR12A58A7AE39', 'SOIFLMJ12A8C13FA94', 'SOJWJRF12A6701C572', 'SOIOPJQ12A58A78224', 'SOISXEJ12A8C133A8B', 'SOXZSES12A8C13A54B', 'SODERYM12A6D4F85DC', 'SOZPBSQ12A6D4F7827', 'SOTDBWV12A6701F798', 'SOBSLVH12A8C131F38', 'SOSSDPE12A81C206E9', 'SOSIHDZ12A58A790E1', 'SOCRRJX12A6701D96A', 'SOLZCOZ12A6D4FA43A', 'SOQWZML12A8C133859', 'SOXJARM12A6D4F7FDF', 'SOWNKRG12A58A7F241', 'SOUAHAL12A6701C924', 'SOAVQCK12A8C13CBA9', 'SOGLDUV12A58A79292', 'SOZBZFF12A6310F12D', 'SOURUTK12A81C2097C', 'SOVLSIR12A8AE46ED7', 'SOEZFIG12AF729D52E', 'SOUVLRM12A8C141A0E', 'SOFJVKK12A6701D96E', 'SOCFNKA12A6310D8EB', 'SODLENQ12AF72A3DA9', 'SOMBPXU12A58A7C87C', 'SOUUGCN12A58A7A380', 'SOCOADR12A6D4F7B66', 'SOYWJNS12A8C134950', 'SOTJTQI12A6D4F75A2', 'SOPPUGC12A670215F6', 'SOAEBUY12B0B8084C3', 'SODMSAR12A58A7A6D1', 'SOWOGQD12AB018EBC6', 'SOZSQYV12AB018B652', 'SOECVVN12A58A7B4D2', 'SOCWIWP12AB018D16D', 'SOIVIRC12A6D4F74D6', 'SOQNZJN12A8C13978A', 'SOVVYFT12AB0182DFC', 'SOIEAJT12A8AE458EC', 'SOSQWUQ12AB0186E8E', 'SOKCOTF12A58A79C41', 'SOGKGDF12AF72A5DD6', 'SOOGNBA12AB018607F', 'SOEYJDP12A8C138D4B', 'SOFAIUK12A6D4F66E3', 'SOBQLCM12A6D4FAFCD', 'SORJCIA12AF729FF68', 'SOUNXOC12A6D4FB438', 'SOIPUCH12A8C135A25', 'SOTQVSE12A6D4F8200', 'SOLLNTU12A6701CFDC', 'SOBJQJZ12A8C136D72', 'SOVTOHM12A8AE48727', 'SOVQEOQ12A81C2323D', 'SOCONZX12A8C13F7BC', 'SOKBMWD12A58A7DDD4', 'SOECPPC12AB0183841', 'SONSOQN12A8C143737', 'SOKOZPV12A6701DF92', 'SOAHLGV12AF72A6DFC', 'SOWTYVO12AB0180BDA', 'SOKTMQF12AB0181FD7', 'SOAMMRQ12A8C1345F3', 'SOWBHRF12A8C137AB2', 'SOFQNSK12A8C141EF3', 'SOTZYYJ12A58A7D581', 'SOIVBNO12A58A75411', 'SODKEEX12A6701F7C8', 'SOIQUYO12A6D4F6640', 'SOWTTQH12A8C13C17E', 'SOKOTYF12A8C13F2E7', 'SONQQMT12A8C13711A', 'SOZZLCQ12AC468977C', 'SOMVGUS12A58A7D1A1', 'SONXPDV12A6D4F94E4', 'SOXIZOP12A8AE47394', 'SOCUDQZ12AB01834A0', 'SOAYMVE12A6D4FADA9', 'SOAKMDU12A8C1346A9', 'SOBLRAF12A8C13D091', 'SOJNASF12AF72A05F8', 'SOWIZWQ12A6D4FAC82', 'SONYVCJ12A8C13743B', 'SOMSPXO12AB0182B78', 'SOYWLHH12AB0182579', 'SOAVHPR12A8C131F22', 'SOXODJD12A6D4F98E9', 'SOSZOGX12A6D4F85AC', 'SOLXDHR12A6D4F712B', 'SODGKKE12A6D4F9359', 'SORFHOZ12A6701E129', 'SOHJBOC12A6701FBBE', 'SOZSRLH12A6702085D', 'SOKANYX12A8C13A252', 'SOGEFNI12AF72A1FA5', 'SOXRZVW12A5891D696', 'SOURHIC12A8C13B4BC', 'SOPYQKP12AF72ACBBB', 'SOAEIFW12A8C1391E4', 'SODAJWB12A8C13BE3E', 'SOYBMKC12AF72A44EC', 'SOTDFFF12A58A7EED0', 'SONXXAB12A8C1414F6', 'SOPVZKE12A58A7B6C1', 'SOPARNW12B0B80AD8D', 'SOOJIVY12A8C13746F', 'SOEBGUP12A6D4F60AD', 'SOWHYTU12A8C13C8A4', 'SOSNYYW12AF729BA6E', 'SOMSDZV12AF729F35E', 'SOMTYRF12A6701CFDD', 'SODVHDW12A8C134043', 'SOVTPHI12A6D4F85A9', 'SOPMXLQ12A8C1304A2', 'SOPKVQT12A6701FB27', 'SOIWUMQ12A8C13E073', 'SOFUZMG12A8C137116', 'SOYBDYR12A58A7B7AD', 'SOCDWAI12A8C131F29', 'SOYNJHA12A67021601', 'SOIOJGL12A8C133F71', 'SOXGAOF12A8AE48685', 'SOQRYRV12AB017C6A0', 'SOFROOV12A67020901', 'SOYLYKD12AB017DFFB', 'SORWLTW12A670208FA', 'SOCJUEL12AB0182FC6', 'SOQAKEV12A6D4F7A3B', 'SOMBENG12AF72A87B7', 'SOVQZUX12A6310D7D5', 'SOICVFJ12A8AE47FF0', 'SOUWKAM12A8C138146', 'SONJLVN12A6702036A', 'SOBRZTB12A8C13A3AB', 'SOSQQGF12A6310F0FB', 'SOZOHMX12B0B806619', 'SOMBFBW12A6D4F935F', 'SOXSGYL12AB0186460', 'SOBAHMO12A58A7B731', 'SODUZYO12A58A75BE1', 'SOBJMDL12A81C2343C', 'SODVSFY12AB017F8ED', 'SOPAMXF12A8C1313C2', 'SOIVOKD12A8C135E57', 'SOESNDU12AB01856BA', 'SOISIJN12AF72A18A0', 'SOACZFH12A6701D7C6', 'SOWXJJJ12A58A7A16D', 'SOLNVAT12A6D4F7CA4', 'SOWSXYV12A58A7CCC3', 'SOQIZSW12B34F1C95E', 'SOWTWNT12A58A79D3B', 'SOGKWLT12A8C130D64', 'SOLEGBU12A6D4FD248', 'SOCWJGS12A8C13943D', 'SOUVJAQ12A8C13725C', 'SOIJTCX12A6D4F8247', 'SOKEQSX12A58A7DD76', 'SOEATXV12A8C1363E9', 'SOEPIAJ12A6D4F7CA5', 'SOUYCVZ12A6D4FB69C', 'SOWRORZ12A8C1351A2', 'SOGUPPE12A58A7F4E3', 'SODPVGL12AC9075478', 'SOLHXPC12A8C142CC6', 'SOXAOZI12A8C139BB1', 'SOPMAEU12A67AE0C81', 'SORSXYJ12AB01882C9', 'SOXEWTL12A58A7D012', 'SOHQBNE12A58A797DA', 'SOVZYLM12A58A7F684', 'SOPSRTH12A58A773C3', 'SOSSQKN12A6310F224', 'SOOZGQE12A8AE45D86', 'SOPTYJX12A6701CDC6', 'SOLGAMS12A8C1327A8', 'SOVAKWK12A67020865', 'SOQTAYJ12A8C141FCD', 'SOZDFPF12AB0180DC1', 'SOZPLKR12A6D4F8421', 'SOKYZSI12AB0183789', 'SOAJVCD12A6701D947', 'SOWVKGK12A8C139CCF', 'SOFRCGW12A81C21EA6', 'SODBSXC12A6D4FB4B1', 'SOYYRIR12A6701E9A7', 'SOFUYYV12A6D4F5AE2', 'SOPWVTH12AB01843CE', 'SOHUTNF12A8AE47E42', 'SOONSQZ12A6701D7C1', 'SOVGSEL12A8C141591', 'SOEORIW12A8C142E46', 'SOOGVVQ12A58A7EEBD', 'SOVBMWZ12A6D4F9410', 'SOZOVQO12A67020927', 'SOFAHVH12A8C13C75B', 'SOWCKAR12A670215F4', 'SOAFZVD12A58A7C428', 'SOCOZKO12B0B8066E3', 'SOUNRWH12A6701D1A5', 'SOTTCQX12A6D4F8019', 'SOPCTBB12AF72A1B64', 'SOJXKYW12A8C13F280', 'SOMGXHN12A58A7929F', 'SOSBPKL12A8AE47388', 'SOMRYYN12A6310F0F3', 'SOTUILE12A6D4FA444', 'SOVVRDZ12A6701C577', 'SORYGRZ12AB018149C', 'SONEJZL12AB0187912', 'SOXIXRI12AB017F1A7', 'SOLIWZV12AF72A8CE6', 'SODYWBD12A8C139845', 'SOFERJG12A8AE46C62', 'SOLGICL12A6D4FA43B', 'SONHGEK12A8C144ED0', 'SODZBLX12A8C132E15', 'SOCBMFC12A6701D7BA', 'SOSOUKN12A8C13AB79', 'SOTQERH12A6701C921', 'SOBAFEM12A58A783A0', 'SONNLHL12A8C1325D2', 'SOOWPXT12A8AE46F1D', 'SOBXCYL12A6D4FB14D', 'SOFGJCW12AF72A812D', 'SOAFILG12A8C13ED00', 'SOFRVRA12A6D4F7D71', 'SORZZFI12A58A7AFC8', 'SOWFFMX12A81C1FE07', 'SOBTYWM12A8C130A21', 'SOEQGRA12A6D4F7350', 'SOBRGZW12A8C13C541', 'SOHLXSM12A6D4F9413', 'SOEYAVU12AB01837AA', 'SOKKEKF12A8AE475F0', 'SOIEVTM12A67021D72', 'SONDOME12AB017FD16', 'SOHOWTX12AB017B685', 'SORXHCJ12AB0185D23', 'SOVSRZJ12A6D4F5902', 'SOCXBGS12A6D4FA78C', 'SOYGHOJ12A6701FFBA', 'SOKOTER12AF729ED7D', 'SOLLBSS12AF729F9A6', 'SOIPFGR12B0B8063CB', 'SOUANOU12A81C21E5F', 'SOTPGCG12A8C140B9E', 'SOKHAAH12A8C13DAEA', 'SOIUHKT12A8C131EF9', 'SOZBZSY12A6D4FA404', 'SOTHSKU12A8C1439B0', 'SOQNYNH12A58A7E880', 'SOIIAVN12AB0182FF2', 'SOPVNZW12A67ADE982', 'SOASYKV12AF72A29BE', 'SOOHNJD12A6D4F89FC', 'SOYPXUP12AF72A351B', 'SOESTZQ12A67021556', 'SOOXJTH12A58A7D1FC', 'SOWNRNL12A670215F8', 'SOXZOET12AF729E749', 'SOTYBNZ12A8C13676A', 'SOJHFJP12A6D4FD948', 'SOHHMRB12A6D4FB5EA', 'SOSIAKO12AB0180AA0', 'SOIICEF12AB01845DA', 'SOFMZDX12A670208FB', 'SOQDPMA12A8C1402DE', 'SODTAIB12A58A76058', 'SOEYFKI12A8C137F5A', 'SOPZXWU12AB018228C', 'SOMLUZO12A6701C88D', 'SOSCGFN12AF729B231', 'SOOYDAZ12A58A7AE08', 'SOMDVSE12A67020645', 'SOXNCHQ12A58A783F1', 'SOBWDFY12A58A7B175', 'SOGZEID12A67AD8675', 'SOLOQJG12A81C20457', 'SOTCYYL12A6D4FB69F', 'SOBMYGH12A6D4F66E2', 'SOMWASN12A6D4F72B3', 'SOUKHWL12A8C139C28', 'SOWFPPB12A8C1380BF', 'SOAFIOA12A6310E033', 'SOTYYZI12A8C137F78', 'SOMMHAJ12A58A7B260', 'SOCZQUU12AB018CFEE', 'SOXBXBA12AB01872D7', 'SOUNHLB12AB01830EE', 'SOIADQQ12AB0182B8A', 'SOUEXWX12AF72A5FBC', 'SOIMZKY12A8159E8E6', 'SOTEFLI12A6D4F4771', 'SOPPITR12A6701C7F4', 'SOYDOFN12A8C1434C1', 'SOKQZYZ12A58A7767E', 'SOWDRCH12A8159E8B4', 'SOSPVPG12A8C13D047', 'SOQHDAV12A670206FE', 'SOZDENG12A8C13C632', 'SOPGKZW12AF729DFBB', 'SOSIDOG12A58A7CD7B', 'SOOKWFI12A8C130B81', 'SOPYGKE12AF72A8598', 'SORBZFR12A8AE46E4D', 'SOAMFCO12A6701F117', 'SOJWBYS12A67AE17A1', 'SOPDWDP12A6701C923', 'SOECKND12AF72AB34A', 'SOUCKTI12AB017DF15', 'SOULKJA12A8C140620', 'SOOYZAV12A6D4FA3FC', 'SOINJVD12A6D4F91D3', 'SOMLWOQ12A8C130F05', 'SOAWHRJ12A6D4F56F9', 'SOKXUJQ12A6D4F3C96', 'SOUVUJA12A81C210DF', 'SOUQERE12A58A75633', 'SOMMCFN12A6310F12F', 'SOYYIMJ12A67021CD0', 'SOPONUS12A6D4FB437', 'SOXLQXV12A8C1364F5', 'SOFCVTY12AF72A493B', 'SODEMBR12A6D4F5929', 'SOTBPPB12A8C141C3B', 'SOGYCMM12A8C13E650', 'SODJYUS12A8C13B8A4', 'SOFCVVJ12A6D4F5BD0', 'SONHIND12AB01854AC', 'SOAVPQM12A67020799', 'SOMXZDZ12A6D4F7D6C', 'SOBUGVE12A8C13F4A8', 'SONNBCF12A8C13F286', 'SOFIDEY12AF729FFDB', 'SOCFSAJ12A8C142A8B', 'SOGHSQA12A8C14098E', 'SOWBOJG12A8AE462BE', 'SOHZBUY12AAF3B2723', 'SORRJBU12A8C139449', 'SOPXOGM12AB0180DB4', 'SOQLRGQ12A8C13DB9F', 'SOWMAZE12A58A79390', 'SODYZYJ12A8C137332', 'SOQQRXS12AF72A186D', 'SOTTLPQ12AAF3B1F13', 'SOYVUII12AB018A5DC', 'SOFJAID12A8C1385A9', 'SONQPDO12AF72A5839', 'SOWFDQA12AB017ACFE', 'SOLDYNN12A6D4F7FE4', 'SODKOIH12A6D4F9E95', 'SORJVDO12AF72A1970', 'SOPXLWJ12A8C132639', 'SOHWZQW12AF72A4400', 'SOCUGKK12A58A79EDD', 'SOHIXIC12A58A79DC5', 'SODOLVO12B0B80B2F4', 'SOTUDJQ12A6D4F66E0', 'SOQUSOG12A58A7A73C', 'SOZHPEI12A8C138502', 'SOATKNA12A8C130B6D', 'SOCATPK12A6D4F98EC', 'SODDWLV12A6D4FCD79', 'SOMXDDL12A6D4F97DE', 'SOKWMMV12A6310E136', 'SOZVLIV12AB0184775', 'SODYLIK12AB01849AF', 'SOKSPLA12A6D4FC01F', 'SOZHFSO12A6D4FB162', 'SOTSBJS12A6D4FD27A', 'SODNNHQ12A67ADBAB8', 'SOOXBEE12A67ADFA50', 'SOKPNTC12AF72A8184', 'SONGILQ12AB01805E8', 'SOXQPJC12A8C13C259', 'SOMFQVL12A8AE479E0', 'SOPXKYD12A6D4FA876', 'SOLHMFX12A8C1345FC', 'SODUQLE12AF72A0F05', 'SOXVUBM12A58A7DAE2', 'SOQHWMN12A6701E2D9', 'SOKKMRS12A67ADD134', 'SOLPEGI12AF72A2188', 'SOYWPMG12A6D4F901A', 'SOYIUPV12AF72AC56B', 'SOETQSU12A58A7E2A0', 'SOCJHPS12A6D4F8523', 'SOWYFAX12A6D4F7A3D', 'SOSIGTV12A58A7B498', 'SOWPOGN12B0B809692', 'SOZNOMS12A6310D7B3', 'SOKLSZA12A8BEEEF24', 'SOCPHRB12A6D4FD246', 'SOFVSYJ12A58A793EB', 'SOQEYZY12A58A77AF2', 'SOBBUGU12A8C13E95D', 'SOHOZBI12A8C132E3C', 'SOXQYSC12A6310E908', 'SOMHGMP12A6D4F5904', 'SOZGQLE12AB018672C', 'SOISFRK12A6D4F573D', 'SODTVZF12A6310E1FA', 'SOOXLKF12A6D4F594A', 'SOKQVLX12A6D4FB2EA', 'SOQYXOV12AB017FE9C', 'SOKNRLD12AB018496B', 'SOXZNHO12A58A77BE4', 'SOSGFNT12AB0182B70', 'SOMVREG12A8C140932', 'SOOZBJW12A58A76428', 'SOGZULC12AB018116C', 'SOFVYCD12A8C13808B', 'SOHNPVB12A8C137674', 'SOLBTPS12A58A7D8A0', 'SOGQKZJ12A8C13FA87', 'SOPXTAX12A6D4F573B', 'SOLIQUE12A58A78306', 'SOAYXCJ12AB0183822', 'SOGNHVK12A8C137A27', 'SOSEEKD12A8C13DA27', 'SOKRBVJ12A6701D96C', 'SOFPFZB12A8C13BC47', 'SOTNXPT12AB018100B', 'SOLJWIQ12A6D4FA875', 'SOAOAXY12A8C1434E5', 'SOFTSRG12A6D4FA7EE', 'SOXXQAV12A8C139DE6', 'SORIKCG12A67ADD295', 'SOJOBSO12AF729EA6B', 'SOHGTTV12A6BD5639F', 'SOXGTHC12AB017C9B6', 'SOQKBUJ12A6D4F7D6F', 'SOHIHJO12A58A78DAD', 'SOCHULO12A58A7D141', 'SONIOHY12A58A7A313', 'SOJAUZC12A8C13EC2C', 'SOSERCK12AB0186462', 'SOLHMLZ12AF72A15E1', 'SOLNBBA12A8C1363BE', 'SOBWWEP12AF72A897C', 'SOPDKNV12A58A7BC82', 'SOYAWUE12A8C133831', 'SOEYSOQ12A8C13C53D', 'SOMJFPG12A58A7DD95', 'SOPHUCL12A6D4FB69B', 'SOVGONQ12A81C207FA', 'SOFPXFY12A6701C5C3', 'SOTRQEJ12AF72A45D7', 'SOBKIDR12A8C142A57', 'SOSLHFN12AC4685CEB', 'SOXYGZH12AB018C2A0', 'SOIEZIN12A58A7CC46', 'SODLYRF12AB01861E0', 'SOKFUST12A67021088', 'SOXRBNT12A8C1377FC', 'SOOKDTB12AB01822CB', 'SOYQKDL12AF729A9A6', 'SOVEBRB12A8C134111', 'SOOBGSW12A6D4F9D51', 'SOYITRT12A6D4FA789', 'SOHDHXK12A6D4F74EF', 'SOCQJZC12AF72A7021', 'SOTGOVG12A6701C573', 'SOWFIOJ12A6310E039', 'SOXQVAV12AB01807C0', 'SOPOXUR12A8C1331F2', 'SOPWUAM12A8C140D84', 'SONNSYV12A8C146BEC', 'SOFMIPR12A8C136A8D', 'SOHNOOC12A8C13BF35', 'SOCVEND12A6701D1AC', 'SOMKNSW12A58A7750C', 'SORRLWD12AB01804A3', 'SODJMPP12A670214B8', 'SOEQKIM12A6701C91C', 'SOTWWSP12AB017F5FF', 'SOBZPVT12AF72A11C6', 'SOPWJEQ12A6D4FB454', 'SOUXZPI12A58A76628', 'SOGBAFJ12A8C141D1D', 'SOWASXJ12A6701E2D3', 'SODAZQM12A8AE48F5E', 'SOLKFTL12A8C13E0DF', 'SOUYQRD12A67020AEA', 'SOUTJYC12A6D4FB439', 'SODBWWP12AB0182C8F', 'SONHOXQ12A8C13EFD8', 'SOIUPNL12A6310D89B', 'SOGKPJY12A6D4F573A', 'SOJJGPT12A6701C91D', 'SOHITPB12AF729F8F8', 'SOOTKXX12A67021D0B', 'SOKMPTJ12A8C132634', 'SOGGPGF12AF72A53FA', 'SOYBHSI12A58A7D58B', 'SOAOOZF12A6D4FB430', 'SOWDXQU12AF72A9F59', 'SORTDSD12A6D4F798B', 'SOJZFJE12A8C13FF01', 'SOYDIVD12A58A78473', 'SOKBHJL12A67AE0AA4', 'SOCICBA12AB0181144', 'SOZQKUW12A6D4F7BB1', 'SOEDBQL12A670213B3', 'SORBBMC12A81C2132C', 'SOIEVEG12A8C145D40', 'SOINKEZ12A6310E1FC', 'SOCIAPE12A6701C614', 'SOZHHWK12A8C13F4E8', 'SOSVPIE12A6D4FA873', 'SOFJGYI12A813568B8', 'SOXPHIP12A6D4FB44F', 'SOMQVZN12A8C1403FC', 'SOJXYSX12A8C143107', 'SOHAASB12A8C1397B4', 'SOYWRIK12A6BD563A1', 'SOICJBC12AB018BBAA', 'SORQYLM12A8C132BCF', 'SOCCBMV12AF72A3E7B', 'SOASKHY12A8C13AD0A', 'SOOWDKL12AF72A7650', 'SOKJESY12AF72A5018', 'SOMDVMS12A6D4FB8C6', 'SOFWANS12AF72A12E6', 'SOKPVZF12AF72AA4A0', 'SOAZNRS12A6D4F9520', 'SOJKJGM12A8C13C4FC', 'SOEALZL12A58A79A4C', 'SOSRSKS12A8C141369', 'SOMUIYL12A8C13CD5D', 'SORNQNE12A6D223BBD', 'SOEKNMO12AF72A1918', 'SOJMKYU12A6D4F8F44', 'SOJFCAC12AB0186C16', 'SOBDJTN12A8C1372C5', 'SOGOOAB12AF72A071D', 'SOKPPXL12A8C14589A', 'SOIMTRK12A58A78A88', 'SOHEOOT12A8C1418B6', 'SOVOBOU12A8A9D6899', 'SOQWJTA12AF72A3962', 'SOVXGXI12A8C1327AE', 'SOCYOTN12A8C13A4B1', 'SOURSOL12AB01826A9', 'SOATTBY12AF72ACDEA', 'SOFNSGV12A8C1434E9', 'SOVOKOY12A6D4F9521', 'SOKWIDV12A8C136365', 'SOQXTDZ12AF729F8B4', 'SOSQGMV12AB0190157', 'SONGTTU12A58A7B6BC', 'SOGYUIT12B0B80B322', 'SOOAOHY12A6D4F8A11', 'SOFXJCS12A58A7DF02', 'SOUYHZL12A8C13FA84', 'SOQOTWA12A8C13474A', 'SOPHWFU12A6D4FB156', 'SOMYZOW12AB01853EA', 'SOPEVWM12AB018C144', 'SOYICJE12A8C1377F2', 'SOMTLID12A6701F796', 'SOVGMWO12A8159E8CC', 'SOKBPDK12A6D4FB679', 'SOTZJUR12AF72A2B74', 'SOLAYXF12A8C13746D', 'SOJSBDW12A58A7CC54', 'SOXIUGN12A8C13EDE4', 'SOUSVYY12A58A79200', 'SOEUOET12AF72A0B8C', 'SOUWKIV12A6D4F9824', 'SOCYEDF12A670215FC', 'SOPAQBM12A6D4FC6BE', 'SORHWSI12A6310E1FF', 'SOLUHPJ12A8C13AB0F', 'SOPCXFD12AB018BBA4', 'SOSQCNB12A67AE0AA8', 'SOJIGRL12A8C137CF4', 'SOKOJRH12A6D4F86B6', 'SOQQTEB12A6D4F57AF', 'SOHZGHL12A58A7A385', 'SONRWVX12AF72A5897', 'SORRVGP12A8C13EFB9', 'SOQTLHG12A8C1331BD', 'SOZPKFL12AB01821EB', 'SOEUJFC12A8159E8AC', 'SOAYRPU12A58A7EA6B', 'SOKVSQA12AC4689780', 'SOREBOB12A6D4F7986', 'SODAKFC12AB0187EA0', 'SOASZHJ12B0B80A18B', 'SOWJSYM12A8C1364ED', 'SONCNWH12AF72A430D', 'SOVMRRU12A8C13F746', 'SOUJZXN12A8C13B240', 'SOEBDXE12A67021CE8', 'SOIBRIK12A8C143E54', 'SORZBMG12A6D4FB14C', 'SOFRPZP12A8C13B493', 'SOMKFGS12A8C13F985', 'SODEZKA12A8C1345E0', 'SOPSKCB12A58A799F8', 'SOVRLVW12A81C1FFE9', 'SOHLRSW12AF729CB57', 'SOXQEFL12A8C13D665', 'SOWIZVL12A670207DC', 'SOEQDNU12AB018B023', 'SOLDYDT12A81C1FFF6', 'SOFRHUI12AB01819C6', 'SOABMLY12AF72A86B1', 'SOXJUOC12A6D4F9358', 'SOLIICA12A67021CDC', 'SOCIBVR12A6702095B', 'SOQCTUF12A8C1313CA', 'SOFMMTG12A6701E034', 'SODELEJ12A8C13C350', 'SOAIIAR12A6D4FAC81', 'SOJSWSC12AB018B116', 'SOYQPVF12A58A7A264', 'SOAFGGB12A8C13D34C', 'SOXHIMB12A6D4F573F', 'SOJPTYN12A8C140CFE', 'SOKWOIW12A670209E5', 'SOTARGT12A8C1417E0', 'SOIIVGZ12A8C1320CF', 'SOPQLJJ12A8AE47E2D', 'SOYSULD12A6310D7C8', 'SONLAHQ12A6D4F4EFD', 'SOPKEIV12AB018220D', 'SOECAIP12A58A7C1D2', 'SOZPAVC12AB01825E5', 'SOGFXYQ12A8C132088', 'SOTOVIL12A8C133FAA', 'SOHJSYD12A67020959', 'SOOLXXW12A6D4FAC88', 'SOGFRJT12A8AE490A9', 'SOUCJNM12A8C13FA9A', 'SOBHPQK12A58A78E56', 'SOPFWGA12AF72A0DE2', 'SOHOIKX12A8C140E75', 'SOMEUED12A6701DBEA', 'SOMGRPC12AB018C572', 'SOGDMQR12AF72A08E7', 'SOROHMH12A8C13F27A', 'SOKYFGW12AB018B0AD', 'SOOUAFG12A6D4F863B', 'SOSNSFR12AF72A48BD', 'SOSNIVS12A6D4F7DF1', 'SOKBXCA12AF72A6E24', 'SOLOUHP12A6D4F797E', 'SOLYRRJ12AF72A0AE8', 'SOIIELL12AF72A9B42', 'SOOGEJU12A58A7CE52', 'SOYYUKF12AF72A6FC7', 'SOAKURS12AF72A3F72', 'SOBRIUQ12A8C135B86', 'SOKPFUC12A670209E3', 'SOFYVLR12A8C133904', 'SOKQCMB12A8AE47E4C', 'SOYPYFT12AF72A1D58', 'SODKKKU12A8C14081F', 'SOCVTLJ12A6310F0FD', 'SOWUUQG12A6701F9C2', 'SOJYDVG12A67020AC2', 'SOTNWLO12A6D4F50CC', 'SOTCHWI12A58A7AE6E', 'SODSYFE12A6310F10C', 'SOIHNOM12A8C13E962', 'SOAKCFL12A6D4F9CC5', 'SOWNGJQ12AF72AA826', 'SOEUCCY12A58A7AE6E', 'SODSDYL12A8C13B29A', 'SOHVQKL12A8C13DB84', 'SOALJFL12AB0184FED', 'SOJAKBT12A8C1458E2', 'SOLNUNW12B0B806613', 'SOMORRM12A8159E8A4', 'SOUOCWP12AB0188446', 'SOSBJJQ12A8C13F0BC', 'SOGMIXK12A8C137E03', 'SOEMFBP12AB017FD35', 'SOSIRMX12AB0180509', 'SOBLFSK12AC3DF98DB', 'SONQBFL12A58A7F2ED', 'SOEWCPS12AB0181604', 'SOOSAYV12A6D4F7A3C', 'SOJAFFL12A6D4F8F68', 'SOCJQZA12A6D4FB453', 'SOWUVGC12A8C1412E1', 'SORGITG12A8C134A65', 'SOGAZPP12A58A78184', 'SOYHHGK12A6310EE90', 'SONRPUV12A6D4F72BA', 'SOGGLEO12AB01804AE', 'SOMXRON12A8C135B36', 'SOTCNPB12A6D4FAAB0', 'SOQSYQV12A6310D8E7', 'SOHCYRP12A8C13F639', 'SOQZRRG12A81C2099B', 'SOZPOZG12A6D4FA43F', 'SOSXOKA12A8C134186', 'SOGNWDM12A6D4F609C', 'SOXDZSU12A58A78840', 'SOJGFMS12A67AD863F', 'SOPFRZX12A6D4F8263', 'SOSPGNR12A58A7CFF7', 'SORXYXK12A67ADD298', 'SODDKAY12AB018379E', 'SOPJKZZ12A67ADE98D', 'SOCSSCP12A6D4FA5BD', 'SOUTRIX12A67020E09', 'SOJFWIW12AB018AB86', 'SOCHQJN12AC468834A', 'SONAQRQ12AB017FD0B', 'SOIQZXP12AF72A2044', 'SOATFHB12A8AE47E59', 'SOOAUBI12A58A7B678', 'SOWTMSI12A8C13B284', 'SOZGCHA12A67020916', 'SOMUGXW12A6D4FCAC8', 'SOASWPK12A8C13E138', 'SOXXJQK12AF729E5DB', 'SOWPUEB12B0B80B86D', 'SOBNAMV12A8C139423', 'SOQUPNW12A8C13F507', 'SORYVCB12AB0180FF9', 'SOCPHBI12AC3DF6CCA', 'SOUZBUD12A8C13FD8E', 'SOYWVJX12A8C13EDA9', 'SONJJXC12A6701D7BD', 'SOLXVQY12A6D4F477A', 'SOJFTNX12A6D4F5D44', 'SONLDED12A6D4FB6A0', 'SORBYGN12A6D4FAB1E', 'SODCQWE12A67AE1105', 'SOOXPGH12A8C136FF5', 'SOMUPMA12A6D4FB15F', 'SOVLDEY12A67020A6D', 'SOYLMVZ12AB0184848', 'SOYBEUS12AF72A781E', 'SOHOIOG12A8C13149D', 'SOGSKNQ12A6D4FA43D', 'SOTTQAF12A6310F21D', 'SOHMDMX12AF72A3300', 'SOKIHRL12A6701D1A6', 'SOGSJII12A8C1439E2', 'SOMRHDE12A8C1364E4', 'SOABUDR12A6D4FE170', 'SOAIDJT12A8C13C67E', 'SOORESL12A81C2300F', 'SOGXVDA12AB0181FB6', 'SOHMQCB12A6702092C', 'SOQCPGG12A6D4F7CAC', 'SOWYRRB12A8C13ADFA', 'SOOGRAD12AB018B37F', 'SODFDJT12A8C13A08E', 'SOVGWSE12A8C13DFE2', 'SOOYHDP12A6701CDC7', 'SORJWPV12A8C13BC15', 'SOMZYSI12A8AE47377', 'SODDFIK12A6D4F8A7F', 'SOJVHLH12AB0180BC1', 'SOXGXHF12AB0182B7D', 'SOUWROC12A8C141CF3', 'SOBXYAG12A8C14253F', 'SOPOFVZ12AF72A191C', 'SOWDJNK12A8C13B499', 'SOIMIFP12A6D4FC737', 'SOFZZHL12A8C13BD76', 'SOWPIXQ12A8C13E6B1', 'SOZLQPF12A6D4F4776', 'SOSQWIP12A8C13DFD7', 'SOIFCLM12AB01823C3', 'SOHWBGO12A6D4FA87A', 'SOCRXWL12A8C13CBA6', 'SODKVUC12A8159E8AF', 'SOBXOWY12A58A7DEDD', 'SOTSGCA12A6D4F846B', 'SOALURI12A8C136DE8', 'SOGNPPS12A8C135E69', 'SOIYTLP12A6D4FB1A8', 'SORQVXX12A8C13D67C', 'SOQMOVD12A81C23227', 'SOBTJRC12A6310ECD4', 'SOBAYNA12A8C13BC38', 'SOPRHEZ12A81C23248', 'SOYKLUI12A8C13F030', 'SOPCEOB12AF72A778A', 'SOPTZNP12AF72A4535', 'SONNQFI12AF72A0805', 'SOAOVTO12A8C1314A6', 'SOXMFSC12A8C134B49', 'SOQCPKR12A6701DF9C', 'SOOVTTL12AB017BB5C', 'SODYKTU12A6D4F93D2', 'SOKYPYS12AF72A115B', 'SOGNFTM12A81C207F7', 'SOKDBWT12A6D4FB15A', 'SOGDHDU12A8AE466B4', 'SOCSUUX12A8C13EFA2', 'SOAQAIZ12A6310F100', 'SOQIMCQ12AF72A4FB5', 'SOEANJT12A6702084F', 'SOBUNGE12A6701EAFA', 'SOXLRBL12A6310E15E', 'SOGSTTL12A6310D845', 'SOJHAIE12A67AE0EBE', 'SOWSPOO12A6701FFBB', 'SOVIHSY12A6D4FB433', 'SOQWRWG12AF72A0BBA', 'SOJXGZM12A8C132BD8', 'SOWDLPO12A6D4F72BB', 'SOMWABV12A8C137F7E', 'SOXJDUG12A8C137B13', 'SOVLQED12A6D4F5700', 'SODMCMU12A6D4F61E4', 'SOETFWM12AB018BB6D', 'SORPAFD12A8C13E0B3', 'SOFPNMM12A8C134A71', 'SOZTUVG12A582A2226', 'SOYULWL12A8C139C41', 'SOXSJGB12A8C139444', 'SOFMUVD12A58A7EE2B', 'SOBRZTW12AB0182B81', 'SOWLKRY12AB018217D', 'SOZAFRY12A58A7A9C5', 'SOPCRCE12A6D4FAB47', 'SOHLNXK12AB01852AF', 'SOKQXRZ12A8C14348F', 'SONKMBE12A8C137F81', 'SOKWYRE12A8159E8DD', 'SOKEGHC12AB017EF87', 'SOQICYT12A6701C0F7', 'SONMBMW12A6D4F7C14', 'SOBKIVU12A6D4F6FB8', 'SOKJSKZ12A8C14289A', 'SOGKKNY12B0B80912D', 'SOUJITL12A8C1345F8', 'SONVJNI12AF72A897E', 'SOXOEUA12A8C140C38', 'SOGQQVH12A8C13860F', 'SOICKFS12A58A78DDC', 'SOQXJJM12AB017E7BA', 'SONBFPD12A8C14043B', 'SOMWFZU12A6D4F573C', 'SOJTLKO12A6701D955', 'SOJSHBN12A8C138AAC', 'SOUUOGC12A6D4F816D', 'SOYSRGJ12A6D4FAC8B', 'SOJTEHS12A6D4FE1A1', 'SOWLJCU12A6D4F85A7', 'SOOHOHP12A58A7FB38', 'SOAIVZL12A8C139DFB', 'SOPGIBQ12A81C207EB', 'SONYKOW12AB01849C9', 'SOEXJNB12A6701D934', 'SOCSRCP12A8C1416B2', 'SOGYRHR12A6D4F9356', 'SOKZUMG12A6701C91E', 'SOLSFYS12A8C13ECE7', 'SOOEMAX12AF72A3904', 'SOVCULT12A8C13AAC6', 'SOOOYNI12A6310D7B5', 'SOJZYCJ12A8AE48584', 'SOURXZK12A58A789F6', 'SOSGZOE12AB01814B2', 'SOYAXIX12A8C1333FD', 'SOIAXAP12A58A7966E', 'SOHKXRA12AB017E7F8', 'SOGNWYR12A8C13F61C', 'SOQDGUM12A8C13A26B', 'SOBFNNU12A8C13FEDF', 'SOHDNXA12A6D4FB6A1', 'SOUYDFT12AB01821B5', 'SOWWOZE12A8C13249D', 'SOSXTMT12A8C1404BC', 'SOGKHGP12A6D4F855B', 'SOUPNVN12AB018B0B4', 'SOUCPNT12AF72A33AB', 'SOUBAPF12A67021D73', 'SOOMPCJ12A6701C888', 'SOTLWQX12A58A767DB', 'SOBUEXY12A8C13FB59', 'SOCPMIK12A6701E96D', 'SOGFZPT12A58A7BC20', 'SOLJCJW12A6310D810', 'SOJQYBQ12A8C13473C', 'SOUNHMW12A8C1333E0', 'SOMEDXC12AF72A7580', 'SONPXRY12A58A76E53', 'SOHITZP12A8C13DB9C', 'SOOMBZM12A58A79AD3', 'SOYNWIH12A6D4F648C', 'SOCUUNW12A58A7C458', 'SOPPVRH12A8C138732', 'SOFSTBP12A8AE476BF', 'SOFIYJX12A58A79131', 'SOKZZCE12AB0186073', 'SOPLOHH12AB01804B0', 'SOUSEFU12AF72A6A3F', 'SOMXROR12A58A763AA', 'SOASTPI12A58A7E0F8', 'SOFZDFV12A6701F79D', 'SOXNOYN12A6D4FB4B4', 'SOZPUFV12A6D4F5740', 'SOCBBZO12A67021D6F', 'SOWHFHV12AF72A2DAE', 'SOWNHLY12A8C1326C6', 'SOZAOWC12A8C13C64E', 'SODVKJC12AF729F491', 'SOLLNWC12A8C133FB2', 'SOYVBOU12A6D4F5BC5', 'SOKLHVK12A8C13404F', 'SOMNATQ12A6D4FBC79', 'SOFYKEG12A8C14372B', 'SOQFSEW12A58A7DCC6', 'SOBMGRQ12A8C13D44F', 'SOHBJSM12AB0185298', 'SOVNWNX12A58A7CB7A', 'SOVYKSY12A8C13E4BA', 'SOCRHFJ12A67021D74', 'SOXCKVV12A6D4FD27D', 'SOLAWJC12A6D4FA43D', 'SOZKNJE12A6701D1A7', 'SOBOIEV12AF72AA869', 'SOKHENL12A6701C922', 'SOSLMAY12A81C23242', 'SOYRVCS12AB01856E2', 'SOVDLVT12A58A7B988', 'SOLAUQP12AF729FE6C', 'SOBZBPR12A8BEEEAED', 'SOAMYKG12AF72A39F7', 'SOENKVM12A6D4F85AA', 'SOBAPJF12A670208FD', 'SOWAABG12A67ADAC36', 'SOHTZUF12A8C13582B', 'SOGNIIZ12A6D4F7A47', 'SOGKRAG12AAA8C8611', 'SOGQSDK12AB018B305', 'SOKMHKY12AF72AB079', 'SORBBRE12AF72AAF1A', 'SOPMHBZ12A6701E0FE', 'SOLSEQE12B0B80BBCB', 'SONEYDZ12A8C1363B0', 'SOQXHMG12AF72A4D81', 'SOROXAI12A58A7D528', 'SOBUGAU12A6701F797', 'SOTVIVQ12A8C1384D4', 'SOTDZJJ12A6D4F9919', 'SOLRVZZ12A58A7E04A', 'SORUHUR12A58A7B9C7', 'SOSTGAF12A58A7B18B', 'SODJICN12A67020915', 'SOGQXLM12A679D8AF9', 'SONVWDG12A6D4FA5B8', 'SOTXDSQ12A58A7BF9B', 'SOWHFRP12A58A7DD1D', 'SOIOFVZ12A6701C926', 'SOJAMUV12A58A7AB78', 'SOPGVDY12A81C22FA7', 'SOMWLBO12A67021628', 'SOPPFGT12AF729F57D', 'SOXQHOP12A8AE48C90', 'SOWOJRO12A8C13AC61', 'SOIAVVX12A6D4FD26B', 'SOZCGJX12A6D4FA5B9', 'SOCQCOM12AB017EFC1', 'SOBJROJ12A8C1327A3', 'SOTBGID12A67020914', 'SOHZVVD12A58A7BE3D', 'SOUKJBT12A6701C4D6', 'SOEEAZF12A58A7ABE6', 'SOZGDUH12AF72A6DB2', 'SOKBGHT12A6310DF55', 'SOJMBRP12A58A7C1A9', 'SOWQYII12AB0187393', 'SODAOII12AF729D951', 'SOHQELP12A8C13645A', 'SOUDGTW12A8C1434DD', 'SOOXRJG12A8C13773E', 'SOCVHOS12A58A7BBE6', 'SOVDWRU12A8C13DD9F', 'SOOSVTO12A8C13EF96', 'SOCLQQE12A6701EAF8', 'SOSYJCJ12A67020376', 'SOVBRCP12A6701D7B5', 'SOLWTFI12A6D4F66E1'], 'tag_id': 't_16'}\n"]}]},{"cell_type":"code","metadata":{"trusted":true,"id":"eB_c5m2FdgRB"},"source":["# dict with hyperedges\n","\n","hyperedges = {}"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"zEDs_XrqdgRB"},"source":["# hyperedge users\n","\n","def add_user_edges(user_row):\n","    hyperedges[user_row['user_id']] = {}\n","    hyperedges[user_row['user_id']]['members'] = user_row['songs']\n","    hyperedges[user_row['user_id']]['members'].append(user_row['user_id'])\n","    hyperedges[user_row['user_id']]['category'] = 'user'\n","user_hyperedges.apply(add_user_edges, axis=1)\n","\n","# hyperedge releases\n","def add_release_edges(release_row):\n","    hyperedges[release_row['release_id']] = {}\n","    hyperedges[release_row['release_id']]['members'] = release_row['songs']\n","    hyperedges[release_row['release_id']]['members'].append(release_row['release_id'])\n","    hyperedges[release_row['release_id']]['category'] = 'release'\n","release_hyperedges.apply(add_release_edges, axis=1)\n","\n","# hyperedge artists\n","def add_artist_edges(artist_row):\n","    hyperedges[artist_row['artist_id']] = {}\n","    hyperedges[artist_row['artist_id']]['members'] = artist_row['songs']\n","    hyperedges[artist_row['artist_id']]['members'].append(artist_row['artist_id'])\n","    hyperedges[artist_row['artist_id']]['category'] = 'artist'\n","artists_hyperedges.apply(add_artist_edges, axis=1)\n","\n","# hyperedge tags\n","for tag in tag_dict:\n","    tag_id = tag_dict[tag][\"tag_id\"]\n","    hyperedges[tag_id] = {}\n","    hyperedges[tag_id]['members'] = tag_dict[tag][\"songs\"]\n","    hyperedges[tag_id]['members'].append(tag_id)\n","    hyperedges[tag_id]['category'] = 'tag'"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"Lp7sg1p0dgRE","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1631003139343,"user_tz":-120,"elapsed":16,"user":{"displayName":"Marco Postiglione","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GgH4oMfyAUOoZeTaaDGC3Vi_LS5mtbEoPeSRbcTpg=s64","userId":"12968427818961586378"}},"outputId":"24b6eec1-6e55-46dc-aecc-8990bc6354df"},"source":["print(hyperedges['u_30'])\n","print(hyperedges['r_30'])\n","print(hyperedges['a_2'])\n","print(hyperedges['t_300'])"],"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["{'members': ['SOHMFDH12AB0186FCA', 'SOSARYL12A8AE45CEC', 'SOTVLQY12A58A798C2', 'SOUOEMP12A8C13866E', 'SOXOUHM12A8AE45D07', 'u_30'], 'category': 'user'}\n","{'members': ['SOKSAZO12A8C131ED4', 'SOMQXZL12A8C131EDA', 'SOQIDQM12A8C1324C3', 'SOXDJVM12A8C131EC7', 'r_30'], 'category': 'release'}\n","{'members': ['SOGQNZJ12A6701F1D6', 'SOCIAPE12A6701C614', 'SOXYUWN12A6701C617', 'a_2'], 'category': 'artist'}\n","{'members': ['SOOLSML12A8C1414DC', 'SOWSQIA12A58A78B5A', 'SOYUPIO12A6D4FD477', 'SOYSBYZ12A8C1427C8', 'SOZHWZB12AB0182B9D', 't_300'], 'category': 'tag'}\n"]}]},{"cell_type":"code","metadata":{"trusted":true,"id":"mAcIXrtGdgRE","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1631003140544,"user_tz":-120,"elapsed":1213,"user":{"displayName":"Marco Postiglione","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GgH4oMfyAUOoZeTaaDGC3Vi_LS5mtbEoPeSRbcTpg=s64","userId":"12968427818961586378"}},"outputId":"8af1ad5a-7811-403b-82d2-6e7859fdbf88"},"source":["# compute hyperedges max_size e min_size\n","\n","max_size = 0\n","min_size = 100000\n","\n","for h_index in hyperedges:\n","    members = hyperedges[h_index][\"members\"]\n","    if len(members) < min_size:\n","        min_size = len(members)\n","    if len(members) > max_size:\n","        max_size = len(members)\n","\n","print(min_size, max_size)"],"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["2 6986\n"]}]},{"cell_type":"code","metadata":{"trusted":true,"id":"oGu7IMwHdgRF","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1631003141391,"user_tz":-120,"elapsed":850,"user":{"displayName":"Marco Postiglione","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GgH4oMfyAUOoZeTaaDGC3Vi_LS5mtbEoPeSRbcTpg=s64","userId":"12968427818961586378"}},"outputId":"ef5d7c8e-9dcf-4c50-e784-1363fed13642"},"source":["# count hyperedge number per category\n","\n","cat_amounts = {}\n","\n","for h in hyperedges:\n","    if hyperedges[h][\"category\"] not in cat_amounts:\n","        cat_amounts[hyperedges[h][\"category\"]] = 1\n","    else:\n","        cat_amounts[hyperedges[h][\"category\"]] += 1\n","        \n","print(cat_amounts)"],"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["{'user': 918725, 'release': 5955, 'artist': 2902, 'tag': 121849}\n"]}]},{"cell_type":"code","metadata":{"trusted":true,"id":"Sc5eENUHdgRF","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1631003141922,"user_tz":-120,"elapsed":533,"user":{"displayName":"Marco Postiglione","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GgH4oMfyAUOoZeTaaDGC3Vi_LS5mtbEoPeSRbcTpg=s64","userId":"12968427818961586378"}},"outputId":"55b4a9e7-0ee9-4616-ba7e-8bde8ba082fd"},"source":["# plot hyperedges distribution\n","\n","pd_df = pd.DataFrame(list(cat_amounts.items()))\n","pd_df.columns = [\"Dim\", \"Count\"]\n","# sort df by Count column\n","pd_df = pd_df.sort_values(['Count']).reset_index(drop=True)\n","\n","plt.figure(figsize=(12, 8))\n","# plot barh chart with index as x values\n","ax = sns.barplot(pd_df.index, pd_df.Count)\n","ax.get_yaxis().set_major_formatter(plt.FuncFormatter(lambda x, loc: \"{:,}\".format(int(x))))\n","ax.set(xlabel=\"Hyperedge category\", ylabel='Count')\n","# add proper Dim values as x labels\n","ax.set_xticklabels(pd_df.Dim)\n","for item in ax.get_xticklabels(): item.set_rotation(90)\n","for i, v in enumerate(pd_df[\"Count\"].iteritems()):\n","    ax.text(i, v[1], \"{:,}\".format(v[1]), color='m', va='bottom', rotation=45)\n","plt.tight_layout()\n","plt.show()"],"execution_count":null,"outputs":[{"output_type":"stream","name":"stderr","text":["/usr/local/lib/python3.7/dist-packages/seaborn/_decorators.py:43: FutureWarning: Pass the following variables as keyword args: x, y. From version 0.12, the only valid positional argument will be `data`, and passing other arguments without an explicit keyword will result in an error or misinterpretation.\n","  FutureWarning\n"]},{"output_type":"display_data","data":{"image/png":"iVBORw0KGgoAAAANSUhEUgAAA1gAAAI2CAYAAABNFik2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nOzde7hdV10v/O/Yl9wvzU7SpNkNbaDpnXuEIj4aKEJVbh6hIggVK0VuB+HoEUHlvIDHG+dFUE61ShU43BFfKqBQCsFzVJCWYmvTpg0tgaZtkubSNEmTfRvvH2sm3c1JaIC5s7L3/nyeZz1rzjHHXPu3ebLp+s4x5pil1hoAAAB+eD3dLgAAAGCqELAAAABaImABAAC0RMACAABoiYAFAADQEgELAACgJQIWAABASwQsAACAlghYAADAEa0r657T7RomGwELAAD4v6wr6/5nkl/sdh2TjYAFAAA8xLqy7iNJZqyta3++2e/rckmThv+hAACAQ9aVdQNJXpjkd5r9y5KsXlfWLU3yP5N8c21dO9TFEk9opdba7RoAAIATyLqy7swkX0qyKclQkrck+YUk85P89tq69s4ulndCM4IFAABkXVl3cZJ7k2xbW9feuK6se3qS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ghYAAAALRGwAAAAWiJgAQAAtETAAgAAaImABQAA0BIBCwAAoCUCFgAAQEsELAAAgJYIWAAAAC0RsAAAAFoiYAEAALREwAIAAGiJgAUAANASAQsAAKAlAhYAAEBLBCwAAICWCFgAAAAtEbAAAABaImABAAC0RMACAABoiYAFAADQEgELAACgJQIWAABASwQsAACAlghYAAAALRGwAAAAWiJgAQAAtETAAgAAaImABQAA0BIBCwAAoCUCFgAAQEsELAAAgJYIWAAAAC0RsAAAAFoiYAEAALREwAIAAGiJgAUAANASAQsAAKAlAhYAAEBLBCwAAICWCFgAAAAtEbAAAABaImABAAC0RMACAABoiYAFAADQEgELAACgJQIWAABASwQsAACAlghYAAAALRGwAAAAWiJgAQAAtETAAgAAaImABQAA0BIBCwAAoCUCFgAAQEsELAAAgJYIWAAAAC0RsAAAAFoiYAEAALREwAIAAGiJgAUAANASAQsAAKAlAhYAAEBLBCwAAICWCFgAAAAtEbAAAABaImABAAC0RMACAABoiYAFAADQEgELAACgJQIWAABASwQsAACAlghYAAAALRGwAAAAWiJgAQAAtETAAgAAaImABQAA0BIBCwAAoCUCFgAAQEsELAAAgJYIWAAAAC0RsAAAAFoiYAEAALREwAIAAGiJgAUAANASAQsAAKAlExqwSiknlVI+WUq5pZRycynlKaWUgVLK1aWU25r3RU3fUkp5TyllYynlhlLKE47ymReVUjY0/d40rn1VKeVrTfvHSikzmvaZzf7G5vjpE/k7AwAA09dEj2C9O8k/1lrPTvLYJDcneVOSa2qtq5Nc0+wnyU8lWd28Lkty+eEfVkrpTfLepu+5SX6hlHJuc/gPk7yr1npGkp1JLm3aL02ys2l/V9MPAACgdRMWsEopC5P8eJL3JUmtdajWuivJ85K8v+n2/iTPb7afl+QDteOrSU4qpZxy2Mc+KcnGWuvttdahJB9N8rxSSkny9CSfPMrnHvx5n0xyYdMfAACgVRM5grUqybYkf11Kub6U8lellLlJltVa72763JNkWbM9mOS7486/s2kb72h9FifZVWsdOcK5h85pjt/X9AcAAGjVRAasviRPSHJ5r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xDvU57PzBZvvw9iRZVmu9u9m+J8myH+L3AQAAOKoJC1illGcn2VprvW6ifsb3qxndqkc6Vkq5rJRybSnl2m3bth3nygAAgKlgIkewnprkuaWUbyf5aDpTA9+d5KRSSl/T59Qkm5vtzUlWJklzfGGS7Yd95qE+h52/udk+vD1JtjRTCNO8bz1SsbXWK2qta2qta5YuXfr9/aYAAACZwIBVa/2tWuuptdbTk7woyZdqrS9J8uUkL2i6XZLk0832Vc1+muNfqrXWUspgKeWapv3zSZ5ZSlnULG7xzCSfb6YA7i6lXNDct/Wyo3zu+J8HAADQqm48B+s3k7yxlLIxnXus3te0vy/J4qb9jXlwtb9TkowkSa11R5K3J/l683pb05Ykr05nMY2NSb6V5B+a9j9I8pOllNuSPKPZBwAAaF3fw3f54dVa1yVZ12zfns4S64f32Z/khUc4/YIk7x3X78okVx7h/GuTnH+E9u1JLvzBKgcAADh2xyVg/TBqrX/W7RoAAACORTemCAIAAExJAhYAAEBLBCwAAICWCFgAAAAtEbAAAABaImABAAC0RMACAABoiYAFAADQEgELAACgJQIWAABASwQsAACAlghYAAAALRGwAAAAWiJgAQAAtETAAgAAaImABQAA0BIBCwAAoCUCFgAAQEsELAAAgJYIWAAAAC0RsAAAAFoiYAEAALREwAIAAGiJgAUAANASAQsAAKAlAhYAAEBLBCwAAICWCFgAAAAtEbAAAABaImABAAC0RMACAABoiYAFAADQEgELAACgJQIWAABASwQsAACAlghYAAAALRGwAAAAWiJgAQAAtETAAgAAaImABQAA0BIBCwAAoCUCFgAAQEsELAAAgJYIWAAAAC0RsAAAAFoiYAEAALREwAIAAGiJgAUAANASAQsAAKAlAhYAAEBLBCwAAICWCFgAAAAtEbAAAABaImABAAC0RMACAABoiYAFAADQEgELAACgJQIWAABASwQsAACAlghYAAAALRGwAAAAWiJgAQAAtETAAgAAaImABQAA0BIBCwAAoCUCFgAAQEsELAAAgJYIWAAAAC0RsAAAAFoiYAEAALREwAIAAGiJgAUAANASAQsAAKAlAhYAAEBLBCwAAICW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V23cNJDrff1wEHe/2TfB+4pP22EXh9kl5e5yZZVlX935ZtBLZX1Qvt2r08NiS5DVgCXAAcBX485fm8BlgJ7G/3WAD8sY13eVX9osV9G7i2Ha+nK8qoqqeSTPbl+5/nUFUHk2xLsoKuOLy/l6MkafZYYEmShqKqHklycZK3AQuqaqL/56nhQIBNVfV0/w9J3gw81980Q9zZpHkOcHlVPX8mndqM0jZgTVX9PsntdIXeSaHA0aq6Ykr/884mWV78HAB2A++jmyHccpbXlCSdAV8RlCQN02662ZldU9rfDZBkPXC8qo4D+4CtaZVSkjfNcM2Z4h4GbmhtK4FLW/sh4Kok57fFITb1XetBYGvvJMkqTrYfuLm3sESSC/hvMfXnJMuAzX3xJ4Dl7fhpYEWSK1rfhUneUFXPACda8QhdgdTzc+DGFn8J3ezci4rJPvcBnwCoqidniJEkDZAFliRpmPYA59NeCezzfJIngO3ATa3ti8BC4HCSo+18OjPFfQNYluQY3bdgjwNU1R+ALwOPAo8AvwWOtz4fA9a0xSaeBD40zf3uAX7X7vcr4IZWIO0AJugKvkN98fcB29s3aQvoiq+vtL7jdN9K0ca9o8Ut7ctpG3BOkiPA94Cxqvr7dA+iqv4EHOPkAlaSNEtSNfUtDEmS5kZbVe/6qnp/X9sB4JaqemwO81hWVc+2Wai9wM6q2jtX9z9VTu34U8CFVfXxM7zGEuAIcFmbBZQkzTK/wZIkDUWSu4C3A+8Ydi7A7Uk20r3a9yDdwhvDdk2ST9P9Xz1JWxHwdLXx3Eu3CqLFlSTNEWewJEmSJGlA/AZLkiRJkgbEAkuSJEmSBsQCS5IkSZIGxAJLkiRJkgbEAkuSJEmSBsQCS5IkSZIG5N8wXl1ZkgyBQAAAAABJRU5ErkJggg==\n","text/plain":["<Figure size 864x576 with 1 Axes>"]},"metadata":{"needs_background":"light"}}]},{"cell_type":"code","metadata":{"trusted":true,"id":"FIO4VjrGdgRG","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1631003154139,"user_tz":-120,"elapsed":12222,"user":{"displayName":"Marco Postiglione","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GgH4oMfyAUOoZeTaaDGC3Vi_LS5mtbEoPeSRbcTpg=s64","userId":"12968427818961586378"}},"outputId":"1c071ad9-c0aa-435e-b56d-d263fca5ea50"},"source":["# for each node, get hyperedges\n","\n","vertexMemberships = {}\n","for h_index in hyperedges:\n","    hyperedge = hyperedges[h_index]\n","    nodes = hyperedge[\"members\"]\n","    for node in nodes:\n","        if node in vertexMemberships:\n","            vertexMemberships[node].append(h_index)\n","        else:\n","            nodeMembershipList = []\n","            nodeMembershipList.append(h_index)\n","            vertexMemberships[node] = nodeMembershipList\n","\n","print(vertexMemberships['SOZOBWN12A8C130999'])"],"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["['u_65', 'u_225', 'u_273', 'u_680', 'u_988', 'u_1032', 'u_1233', 'u_1472', 'u_1663', 'u_2971', 'u_4612', 'u_5313', 'u_5493', 'u_5541', 'u_6417', 'u_6705', 'u_7270', 'u_7965', 'u_8019', 'u_8701', 'u_8820', 'u_9033', 'u_9556', 'u_10410', 'u_10455', 'u_10800', 'u_11478', 'u_11488', 'u_11691', 'u_12001', 'u_12481', 'u_12927', 'u_12937', 'u_13786', 'u_14229', 'u_14637', 'u_14692', 'u_14911', 'u_15007', 'u_16053', 'u_16231', 'u_16547', 'u_16556', 'u_16852', 'u_17422', 'u_17441', 'u_17908', 'u_19598', 'u_19819', 'u_20572', 'u_21247', 'u_21432', 'u_21520', 'u_23622', 'u_23660', 'u_23700', 'u_24199', 'u_24795', 'u_24953', 'u_24999', 'u_25686', 'u_25735', 'u_26139', 'u_26855', 'u_27600', 'u_28516', 'u_28942', 'u_29307', 'u_30886', 'u_32253', 'u_32776', 'u_34789', 'u_35126', 'u_35721', 'u_36227', 'u_36711', 'u_37233', 'u_37378', 'u_37446', 'u_37531', 'u_40009', 'u_40065', 'u_40378', 'u_40581', 'u_40680', 'u_40769', 'u_41108', 'u_42172', 'u_43228', 'u_44553', 'u_46051', 'u_46142', 'u_46164', 'u_46542', 'u_47102', 'u_47466', 'u_48014', 'u_48129', 'u_48194', 'u_49248', 'u_49435', 'u_49489', 'u_49884', 'u_50169', 'u_50822', 'u_50849', 'u_50951', 'u_50979', 'u_51348', 'u_51374', 'u_51738', 'u_51880', 'u_51904', 'u_51959', 'u_53050', 'u_54412', 'u_54881', 'u_55457', 'u_55489', 'u_56001', 'u_57069', 'u_57092', 'u_57184', 'u_58411', 'u_60117', 'u_61050', 'u_62389', 'u_62727', 'u_63308', 'u_63652', 'u_63890', 'u_64323', 'u_65043', 'u_65352', 'u_65545', 'u_66136', 'u_66505', 'u_66637', 'u_67511', 'u_68014', 'u_68551', 'u_69318', 'u_69427', 'u_72345', 'u_72353', 'u_72926', 'u_73169', 'u_73690', 'u_76376', 'u_76885', 'u_77492', 'u_77950', 'u_78969', 'u_79089', 'u_79689', 'u_79764', 'u_80570', 'u_80948', 'u_81124', 'u_81212', 'u_81450', 'u_82147', 'u_84229', 'u_84672', 'u_84677', 'u_84892', 'u_86111', 'u_86734', 'u_86994', 'u_87652', 'u_88321', 'u_89201', 'u_89662', 'u_89783', 'u_91023', 'u_91173', 'u_91663', 'u_92043', 'u_92793', 'u_93094', 'u_93314', 'u_93516', 'u_93560', 'u_94082', 'u_94577', 'u_94781', 'u_95368', 'u_96914', 'u_98009', 'u_98015', 'u_98155', 'u_98543', 'u_99070', 'u_99369', 'u_99904', 'u_100907', 'u_101092', 'u_101412', 'u_101773', 'u_101980', 'u_102928', 'u_103061', 'u_103530', 'u_103632', 'u_103803', 'u_105886', 'u_107041', 'u_107051', 'u_107248', 'u_107302', 'u_107349', 'u_107517', 'u_107689', 'u_107980', 'u_108246', 'u_109067', 'u_109444', 'u_109760', 'u_110019', 'u_110223', 'u_111803', 'u_112134', 'u_112864', 'u_113115', 'u_113119', 'u_113313', 'u_113529', 'u_113945', 'u_114191', 'u_114306', 'u_114395', 'u_114571', 'u_116621', 'u_116934', 'u_118842', 'u_119188', 'u_119511', 'u_120690', 'u_121005', 'u_121451', 'u_121764', 'u_121881', 'u_122016', 'u_122549', 'u_122581', 'u_122771', 'u_122961', 'u_123007', 'u_123093', 'u_123256', 'u_125199', 'u_126404', 'u_127733', 'u_127806', 'u_128690', 'u_129420', 'u_129751', 'u_130223', 'u_130527', 'u_131496', 'u_132492', 'u_132734', 'u_133498', 'u_133915', 'u_134831', 'u_135440', 'u_135941', 'u_136151', 'u_136594', 'u_137287', 'u_139158', 'u_140165', 'u_141499', 'u_141801', 'u_143028', 'u_143356', 'u_144515', 'u_144525', 'u_144714', 'u_145079', 'u_145234', 'u_145311', 'u_145324', 'u_145694', 'u_146042', 'u_146248', 'u_146855', 'u_147024', 'u_147457', 'u_147473', 'u_147637', 'u_148461', 'u_149231', 'u_149976', 'u_150109', 'u_151357', 'u_152094', 'u_152140', 'u_152554', 'u_153530', 'u_154109', 'u_155798', 'u_156155', 'u_156356', 'u_156670', 'u_157122', 'u_157504', 'u_157831', 'u_157953', 'u_158118', 'u_158734', 'u_159346', 'u_159991', 'u_160404', 'u_160521', 'u_160550', 'u_163125', 'u_164455', 'u_165294', 'u_165352', 'u_165669', 'u_166497', 'u_166605', 'u_166733', 'u_167093', 'u_167207', 'u_167313', 'u_167446', 'u_168120', 'u_169070', 'u_169450', 'u_169943', 'u_170029', 'u_170086', 'u_170344', 'u_170433', 'u_170667', 'u_170774', 'u_171083', 'u_171691', 'u_172632', 'u_172710', 'u_173842', 'u_174047', 'u_174109', 'u_174386', 'u_175022', 'u_175437', 'u_175646', 'u_175947', 'u_176041', 'u_176094', 'u_176858', 'u_176933', 'u_178104', 'u_179387', 'u_179716', 'u_180823', 'u_181165', 'u_181516', 'u_181540', 'u_182797', 'u_183501', 'u_183645', 'u_183790', 'u_184868', 'u_184988', 'u_185582', 'u_185852', 'u_186549', 'u_187187', 'u_187460', 'u_187680', 'u_187849', 'u_187853', 'u_188269', 'u_189074', 'u_190858', 'u_191328', 'u_191647', 'u_193609', 'u_193871', 'u_194173', 'u_194799', 'u_194869', 'u_195617', 'u_196414', 'u_196621', 'u_196644', 'u_196730', 'u_198897', 'u_199105', 'u_199977', 'u_200912', 'u_200984', 'u_201991', 'u_202984', 'u_203074', 'u_204045', 'u_204307', 'u_205211', 'u_205247', 'u_205821', 'u_205848', 'u_205983', 'u_207270', 'u_208423', 'u_208573', 'u_208721', 'u_208780', 'u_208885', 'u_209089', 'u_209371', 'u_209431', 'u_209557', 'u_209712', 'u_209875', 'u_210389', 'u_211101', 'u_211426', 'u_212787', 'u_213244', 'u_214342', 'u_214414', 'u_214426', 'u_214728', 'u_214905', 'u_215730', 'u_215818', 'u_216200', 'u_216681', 'u_218217', 'u_220029', 'u_220495', 'u_222148', 'u_222252', 'u_222940', 'u_223102', 'u_223413', 'u_224497', 'u_224773', 'u_224918', 'u_225201', 'u_225286', 'u_225599', 'u_226929', 'u_227278', 'u_228045', 'u_228068', 'u_228104', 'u_228496', 'u_230012', 'u_230367', 'u_230863', 'u_231068', 'u_231210', 'u_232341', 'u_232512', 'u_232551', 'u_233248', 'u_234279', 'u_234501', 'u_234794', 'u_235531', 'u_235550', 'u_235779', 'u_236174', 'u_236432', 'u_236580', 'u_236714', 'u_236757', 'u_236893', 'u_237046', 'u_237148', 'u_237379', 'u_237465', 'u_237961', 'u_238140', 'u_238259', 'u_238403', 'u_238939', 'u_239023', 'u_240017', 'u_240712', 'u_240994', 'u_241276', 'u_241897', 'u_242033', 'u_242385', 'u_242574', 'u_243279', 'u_243918', 'u_244131', 'u_244265', 'u_244689', 'u_245162', 'u_245555', 'u_245955', 'u_246469', 'u_247031', 'u_247711', 'u_247754', 'u_248450', 'u_249227', 'u_249487', 'u_249907', 'u_250322', 'u_250421', 'u_250669', 'u_251565', 'u_253975', 'u_254154', 'u_254372', 'u_254618', 'u_254682', 'u_255026', 'u_256153', 'u_256524', 'u_256906', 'u_257053', 'u_257970', 'u_258121', 'u_258294', 'u_258355', 'u_258421', 'u_258745', 'u_259229', 'u_259266', 'u_259286', 'u_260361', 'u_260608', 'u_260612', 'u_260656', 'u_260994', 'u_262168', 'u_263853', 'u_263950', 'u_264041', 'u_264848', 'u_264974', 'u_265516', 'u_265866', 'u_265928', 'u_266343', 'u_266464', 'u_266979', 'u_267315', 'u_267668', 'u_267694', 'u_267825', 'u_267910', 'u_268131', 'u_268523', 'u_268526', 'u_268614', 'u_268906', 'u_269339', 'u_269390', 'u_270112', 'u_271847', 'u_272347', 'u_272849', 'u_273039', 'u_273110', 'u_273197', 'u_273249', 'u_273432', 'u_273913', 'u_274136', 'u_274183', 'u_274632', 'u_276000', 'u_276125', 'u_276577', 'u_276580', 'u_277045', 'u_277939', 'u_278775', 'u_279810', 'u_280317', 'u_280546', 'u_282021', 'u_282280', 'u_282469', 'u_282514', 'u_282516', 'u_282902', 'u_282973', 'u_284091', 'u_284779', 'u_285311', 'u_285812', 'u_286198', 'u_286582', 'u_287315', 'u_287381', 'u_287647', 'u_287863', 'u_288985', 'u_289336', 'u_290105', 'u_290151', 'u_290211', 'u_290265', 'u_290324', 'u_290738', 'u_290930', 'u_292643', 'u_293030', 'u_293780', 'u_294257', 'u_294651', 'u_294789', 'u_294793', 'u_295462', 'u_295849', 'u_296129', 'u_296603', 'u_297081', 'u_297933', 'u_299282', 'u_300204', 'u_300215', 'u_300314', 'u_300897', 'u_301114', 'u_301317', 'u_301735', 'u_302162', 'u_302461', 'u_303271', 'u_303535', 'u_303854', 'u_304270', 'u_304365', 'u_305820', 'u_306449', 'u_306539', 'u_307045', 'u_307101', 'u_307117', 'u_307756', 'u_308597', 'u_308848', 'u_309107', 'u_309171', 'u_309223', 'u_309741', 'u_310157', 'u_310397', 'u_310493', 'u_311273', 'u_311458', 'u_311988', 'u_312538', 'u_313954', 'u_314953', 'u_316317', 'u_316578', 'u_317214', 'u_317626', 'u_317964', 'u_318933', 'u_320271', 'u_320316', 'u_320746', 'u_322025', 'u_322726', 'u_324070', 'u_324224', 'u_324680', 'u_324738', 'u_324948', 'u_325191', 'u_326054', 'u_326195', 'u_326635', 'u_326819', 'u_326827', 'u_327211', 'u_328930', 'u_329494', 'u_329847', 'u_330098', 'u_330671', 'u_331044', 'u_331415', 'u_332246', 'u_333644', 'u_333902', 'u_334647', 'u_335343', 'u_335391', 'u_335560', 'u_336665', 'u_337003', 'u_337721', 'u_338203', 'u_338234', 'u_338480', 'u_338570', 'u_338607', 'u_339569', 'u_339722', 'u_340105', 'u_340262', 'u_340276', 'u_340362', 'u_340668', 'u_341002', 'u_341036', 'u_341896', 'u_342418', 'u_342592', 'u_345420', 'u_345642', 'u_347021', 'u_347298', 'u_348131', 'u_348496', 'u_350185', 'u_350853', 'u_351222', 'u_351311', 'u_351717', 'u_352170', 'u_352610', 'u_353281', 'u_353865', 'u_354814', 'u_355449', 'u_355540', 'u_355926', 'u_356401', 'u_356478', 'u_356663', 'u_356756', 'u_356920', 'u_357841', 'u_357905', 'u_358145', 'u_358449', 'u_358939', 'u_359111', 'u_359784', 'u_360638', 'u_361305', 'u_362084', 'u_362328', 'u_362428', 'u_363344', 'u_364996', 'u_365099', 'u_365512', 'u_365760', 'u_366399', 'u_366895', 'u_367049', 'u_367099', 'u_367727', 'u_368320', 'u_369547', 'u_370015', 'u_370242', 'u_370244', 'u_370669', 'u_371228', 'u_371793', 'u_373787', 'u_374818', 'u_375622', 'u_375789', 'u_377645', 'u_378380', 'u_378557', 'u_379171', 'u_379601', 'u_379637', 'u_379765', 'u_380386', 'u_380946', 'u_381063', 'u_381260', 'u_382237', 'u_383151', 'u_383430', 'u_383466', 'u_384740', 'u_385065', 'u_385674', 'u_387047', 'u_387322', 'u_388075', 'u_388277', 'u_388358', 'u_388548', 'u_388948', 'u_389546', 'u_389997', 'u_390422', 'u_390922', 'u_391182', 'u_391667', 'u_392158', 'u_393303', 'u_394263', 'u_395224', 'u_395566', 'u_396079', 'u_396471', 'u_396797', 'u_396976', 'u_397106', 'u_398111', 'u_398561', 'u_398718', 'u_399147', 'u_402119', 'u_402249', 'u_402965', 'u_403507', 'u_404372', 'u_404488', 'u_405033', 'u_407135', 'u_408470', 'u_408496', 'u_408544', 'u_409146', 'u_409696', 'u_410178', 'u_411030', 'u_411080', 'u_411963', 'u_412177', 'u_412471', 'u_412957', 'u_413036', 'u_413184', 'u_414374', 'u_414964', 'u_415139', 'u_415448', 'u_416056', 'u_416300', 'u_418624', 'u_419349', 'u_419613', 'u_419781', 'u_420568', 'u_420630', 'u_420717', 'u_420929', 'u_422245', 'u_422973', 'u_423046', 'u_423792', 'u_423806', 'u_424940', 'u_424943', 'u_424967', 'u_425029', 'u_425173', 'u_425724', 'u_425747', 'u_427035', 'u_427729', 'u_428877', 'u_429814', 'u_429900', 'u_430174', 'u_430182', 'u_430525', 'u_430880', 'u_431094', 'u_431256', 'u_431907', 'u_432050', 'u_432144', 'u_432165', 'u_434153', 'u_434983', 'u_435532', 'u_436543', 'u_436999', 'u_437586', 'u_438086', 'u_438109', 'u_438238', 'u_438767', 'u_439890', 'u_440789', 'u_440887', 'u_441975', 'u_444148', 'u_444178', 'u_444331', 'u_444445', 'u_445822', 'u_445991', 'u_446875', 'u_447192', 'u_447237', 'u_447262', 'u_447313', 'u_447358', 'u_449004', 'u_451440', 'u_451478', 'u_453212', 'u_453982', 'u_454841', 'u_454883', 'u_455509', 'u_455585', 'u_455819', 'u_456199', 'u_457095', 'u_457380', 'u_457508', 'u_459068', 'u_459235', 'u_459430', 'u_459803', 'u_460425', 'u_460728', 'u_460992', 'u_461308', 'u_461850', 'u_461864', 'u_462148', 'u_462769', 'u_463104', 'u_463249', 'u_463801', 'u_465449', 'u_465657', 'u_465764', 'u_466007', 'u_466457', 'u_466519', 'u_466522', 'u_467732', 'u_469408', 'u_469469', 'u_469486', 'u_469756', 'u_470397', 'u_471329', 'u_471879', 'u_473235', 'u_473496', 'u_474092', 'u_474601', 'u_474717', 'u_475201', 'u_475575', 'u_475846', 'u_477836', 'u_478049', 'u_479121', 'u_479312', 'u_479359', 'u_479402', 'u_480511', 'u_481562', 'u_482267', 'u_482403', 'u_482956', 'u_483282', 'u_484460', 'u_484671', 'u_484675', 'u_485313', 'u_485472', 'u_486529', 'u_486953', 'u_487045', 'u_487131', 'u_487570', 'u_487640', 'u_487997', 'u_488031', 'u_488213', 'u_488974', 'u_489518', 'u_489749', 'u_490048', 'u_490778', 'u_490786', 'u_491454', 'u_491746', 'u_492334', 'u_493652', 'u_493759', 'u_493825', 'u_494522', 'u_495015', 'u_495097', 'u_495198', 'u_495287', 'u_495377', 'u_495527', 'u_495947', 'u_496845', 'u_498346', 'u_498480', 'u_499402', 'u_500694', 'u_501460', 'u_503395', 'u_503895', 'u_504103', 'u_504540', 'u_504556', 'u_506074', 'u_506360', 'u_506638', 'u_508474', 'u_508897', 'u_508900', 'u_509168', 'u_509169', 'u_509514', 'u_510350', 'u_510956', 'u_511267', 'u_511284', 'u_512917', 'u_512951', 'u_513897', 'u_514046', 'u_514326', 'u_514761', 'u_516356', 'u_517026', 'u_517593', 'u_517678', 'u_518412', 'u_518419', 'u_518467', 'u_520066', 'u_521583', 'u_521610', 'u_522550', 'u_523431', 'u_523685', 'u_523725', 'u_524699', 'u_524737', 'u_526343', 'u_526348', 'u_526908', 'u_527363', 'u_528007', 'u_528882', 'u_530822', 'u_530836', 'u_532029', 'u_532220', 'u_533157', 'u_533565', 'u_533692', 'u_536964', 'u_537344', 'u_537475', 'u_537730', 'u_537935', 'u_538499', 'u_538705', 'u_539218', 'u_539852', 'u_540263', 'u_540882', 'u_540982', 'u_541163', 'u_541809', 'u_541820', 'u_541898', 'u_541933', 'u_542153', 'u_543191', 'u_544629', 'u_544751', 'u_545059', 'u_545412', 'u_545548', 'u_545836', 'u_546268', 'u_546495', 'u_547082', 'u_547188', 'u_547552', 'u_547903', 'u_547999', 'u_548283', 'u_549106', 'u_550219', 'u_550301', 'u_551783', 'u_552070', 'u_552350', 'u_552452', 'u_553321', 'u_553394', 'u_554141', 'u_554650', 'u_554831', 'u_555565', 'u_555941', 'u_555945', 'u_557591', 'u_557951', 'u_558003', 'u_558157', 'u_558789', 'u_560080', 'u_561461', 'u_562584', 'u_564483', 'u_564727', 'u_567774', 'u_567987', 'u_568129', 'u_568385', 'u_568460', 'u_568471', 'u_568558', 'u_568565', 'u_570091', 'u_570173', 'u_570844', 'u_570919', 'u_571071', 'u_571914', 'u_571992', 'u_572032', 'u_572067', 'u_572386', 'u_572958', 'u_573098', 'u_573298', 'u_573601', 'u_573734', 'u_575737', 'u_575898', 'u_576703', 'u_577527', 'u_578135', 'u_578340', 'u_578913', 'u_579904', 'u_579940', 'u_579995', 'u_580204', 'u_580383', 'u_580924', 'u_581296', 'u_581718', 'u_582173', 'u_583071', 'u_583162', 'u_583417', 'u_583795', 'u_585138', 'u_585378', 'u_585822', 'u_586263', 'u_586975', 'u_587299', 'u_587514', 'u_588405', 'u_589001', 'u_589941', 'u_590351', 'u_590982', 'u_591299', 'u_592387', 'u_592994', 'u_594134', 'u_594235', 'u_594242', 'u_594358', 'u_594477', 'u_594952', 'u_595523', 'u_595625', 'u_596003', 'u_596722', 'u_597375', 'u_598212', 'u_598223', 'u_598271', 'u_599606', 'u_599854', 'u_600959', 'u_601416', 'u_603220', 'u_605338', 'u_605800', 'u_606254', 'u_607911', 'u_609577', 'u_609598', 'u_610570', 'u_610862', 'u_611329', 'u_612758', 'u_612929', 'u_613369', 'u_614334', 'u_614462', 'u_614734', 'u_615146', 'u_616668', 'u_617198', 'u_617424', 'u_617483', 'u_617641', 'u_617846', 'u_617971', 'u_618024', 'u_618580', 'u_619004', 'u_619117', 'u_619521', 'u_619561', 'u_620878', 'u_621153', 'u_621522', 'u_621559', 'u_622503', 'u_622831', 'u_623626', 'u_624077', 'u_624869', 'u_625620', 'u_626313', 'u_626404', 'u_626440', 'u_626581', 'u_627704', 'u_629304', 'u_629361', 'u_629494', 'u_629972', 'u_630450', 'u_630465', 'u_630973', 'u_631162', 'u_632327', 'u_632527', 'u_634034', 'u_634183', 'u_635331', 'u_636489', 'u_637041', 'u_637435', 'u_637454', 'u_637591', 'u_638466', 'u_639046', 'u_639068', 'u_639251', 'u_639436', 'u_639511', 'u_639886', 'u_640370', 'u_640442', 'u_640839', 'u_640900', 'u_642838', 'u_642933', 'u_643701', 'u_643788', 'u_643951', 'u_644311', 'u_644846', 'u_644904', 'u_645405', 'u_646217', 'u_646668', 'u_646891', 'u_647722', 'u_647844', 'u_647865', 'u_648039', 'u_648343', 'u_648419', 'u_648475', 'u_649068', 'u_649586', 'u_649599', 'u_649754', 'u_649789', 'u_649834', 'u_650250', 'u_650304', 'u_650482', 'u_651313', 'u_651496', 'u_651721', 'u_652691', 'u_652712', 'u_652942', 'u_653778', 'u_654627', 'u_655539', 'u_655706', 'u_656145', 'u_656676', 'u_657165', 'u_657943', 'u_659138', 'u_659892', 'u_660285', 'u_660315', 'u_660487', 'u_660787', 'u_660839', 'u_661525', 'u_662251', 'u_662672', 'u_662955', 'u_663332', 'u_663938', 'u_664392', 'u_664534', 'u_664600', 'u_664923', 'u_667298', 'u_667477', 'u_667569', 'u_668347', 'u_668373', 'u_668520', 'u_668767', 'u_669188', 'u_669452', 'u_669803', 'u_669825', 'u_670100', 'u_670580', 'u_670940', 'u_671465', 'u_671922', 'u_674489', 'u_674664', 'u_675733', 'u_676812', 'u_677101', 'u_677713', 'u_678643', 'u_678811', 'u_679123', 'u_679810', 'u_679838', 'u_680163', 'u_680392', 'u_681868', 'u_682411', 'u_682711', 'u_682916', 'u_683456', 'u_684125', 'u_684331', 'u_684670', 'u_685264', 'u_685507', 'u_685750', 'u_687081', 'u_687155', 'u_687968', 'u_688957', 'u_689608', 'u_690048', 'u_690829', 'u_691990', 'u_692149', 'u_693166', 'u_693434', 'u_694082', 'u_694370', 'u_695120', 'u_696431', 'u_696708', 'u_697024', 'u_697843', 'u_698517', 'u_699692', 'u_700043', 'u_701257', 'u_701466', 'u_701593', 'u_702212', 'u_702281', 'u_702624', 'u_702682', 'u_703316', 'u_703538', 'u_703552', 'u_704255', 'u_705679', 'u_706385', 'u_706454', 'u_706584', 'u_707588', 'u_707917', 'u_708135', 'u_709048', 'u_709485', 'u_709919', 'u_711002', 'u_712062', 'u_712581', 'u_713011', 'u_714162', 'u_714289', 'u_716265', 'u_716793', 'u_717254', 'u_717818', 'u_718583', 'u_718650', 'u_718825', 'u_718917', 'u_718924', 'u_719104', 'u_719408', 'u_719461', 'u_719626', 'u_720954', 'u_722099', 'u_722139', 'u_722663', 'u_723556', 'u_723714', 'u_723816', 'u_724003', 'u_725023', 'u_725279', 'u_725393', 'u_725620', 'u_725773', 'u_725939', 'u_726208', 'u_726421', 'u_726493', 'u_727889', 'u_728144', 'u_728233', 'u_728496', 'u_728963', 'u_729334', 'u_729601', 'u_729707', 'u_730363', 'u_730634', 'u_731302', 'u_732041', 'u_732134', 'u_732258', 'u_732319', 'u_732829', 'u_734246', 'u_734508', 'u_735578', 'u_735739', 'u_736464', 'u_737550', 'u_737860', 'u_738180', 'u_740175', 'u_741086', 'u_741297', 'u_741968', 'u_743207', 'u_743329', 'u_744094', 'u_744454', 'u_744762', 'u_744771', 'u_745290', 'u_745752', 'u_746469', 'u_747525', 'u_748340', 'u_748452', 'u_748674', 'u_749460', 'u_749683', 'u_750093', 'u_750134', 'u_750883', 'u_751391', 'u_751880', 'u_752295', 'u_752302', 'u_752394', 'u_753263', 'u_753629', 'u_753772', 'u_754058', 'u_754456', 'u_754683', 'u_755775', 'u_755794', 'u_755824', 'u_757077', 'u_757444', 'u_758308', 'u_758323', 'u_758795', 'u_759928', 'u_759942', 'u_760242', 'u_760287', 'u_760466', 'u_761461', 'u_762246', 'u_762534', 'u_762597', 'u_763759', 'u_764231', 'u_764601', 'u_764675', 'u_764704', 'u_764758', 'u_766038', 'u_766154', 'u_767217', 'u_767713', 'u_767750', 'u_768097', 'u_768696', 'u_768848', 'u_769039', 'u_769099', 'u_769626', 'u_770033', 'u_770094', 'u_770698', 'u_770818', 'u_770861', 'u_771852', 'u_772612', 'u_772631', 'u_772882', 'u_773013', 'u_773155', 'u_773395', 'u_773947', 'u_774152', 'u_774208', 'u_775135', 'u_775438', 'u_776060', 'u_776375', 'u_776928', 'u_777554', 'u_778323', 'u_778587', 'u_779044', 'u_779161', 'u_780177', 'u_780263', 'u_782236', 'u_782880', 'u_783018', 'u_783019', 'u_783492', 'u_783532', 'u_783890', 'u_784744', 'u_786378', 'u_787273', 'u_788333', 'u_788363', 'u_788593', 'u_789150', 'u_789604', 'u_789903', 'u_791819', 'u_791865', 'u_792411', 'u_793165', 'u_793169', 'u_793874', 'u_793928', 'u_795722', 'u_796255', 'u_796334', 'u_797286', 'u_798067', 'u_798519', 'u_799313', 'u_799318', 'u_800191', 'u_800280', 'u_800464', 'u_800884', 'u_802064', 'u_802101', 'u_802249', 'u_802802', 'u_802889', 'u_803175', 'u_803395', 'u_803635', 'u_804017', 'u_804055', 'u_804854', 'u_805548', 'u_805948', 'u_806212', 'u_806612', 'u_807238', 'u_807596', 'u_807888', 'u_808683', 'u_809019', 'u_810464', 'u_810992', 'u_811054', 'u_811347', 'u_812251', 'u_812642', 'u_812908', 'u_813722', 'u_813735', 'u_814425', 'u_815319', 'u_815729', 'u_816198', 'u_816669', 'u_816706', 'u_819245', 'u_819523', 'u_819809', 'u_820061', 'u_820104', 'u_820433', 'u_820895', 'u_821008', 'u_821851', 'u_822273', 'u_822520', 'u_822775', 'u_822782', 'u_823311', 'u_823914', 'u_824002', 'u_824336', 'u_824500', 'u_826281', 'u_826531', 'u_827200', 'u_827225', 'u_827252', 'u_829056', 'u_832163', 'u_832843', 'u_835347', 'u_835605', 'u_839158', 'u_840266', 'u_840893', 'u_841547', 'u_842128', 'u_842421', 'u_843744', 'u_843851', 'u_844704', 'u_845871', 'u_847145', 'u_848624', 'u_848744', 'u_849234', 'u_849711', 'u_850603', 'u_850790', 'u_851866', 'u_852269', 'u_852812', 'u_852856', 'u_853393', 'u_853778', 'u_853971', 'u_854829', 'u_854936', 'u_856640', 'u_856910', 'u_857111', 'u_857815', 'u_858182', 'u_858516', 'u_859171', 'u_859243', 'u_859320', 'u_859553', 'u_859949', 'u_860064', 'u_860127', 'u_860197', 'u_860424', 'u_860585', 'u_860654', 'u_860824', 'u_861329', 'u_861449', 'u_861971', 'u_863581', 'u_864041', 'u_864315', 'u_864987', 'u_865212', 'u_865395', 'u_867267', 'u_867426', 'u_869012', 'u_869698', 'u_870024', 'u_870247', 'u_870969', 'u_871060', 'u_872090', 'u_872122', 'u_872176', 'u_872245', 'u_872458', 'u_872618', 'u_872623', 'u_872873', 'u_873022', 'u_873248', 'u_874328', 'u_874674', 'u_874875', 'u_875958', 'u_876605', 'u_877041', 'u_877705', 'u_877800', 'u_878024', 'u_878106', 'u_878891', 'u_879026', 'u_879111', 'u_879119', 'u_879175', 'u_880037', 'u_880870', 'u_880909', 'u_882777', 'u_883623', 'u_885086', 'u_885331', 'u_885430', 'u_885521', 'u_885687', 'u_885886', 'u_886352', 'u_887176', 'u_887236', 'u_887800', 'u_888021', 'u_888646', 'u_890301', 'u_890444', 'u_891184', 'u_891331', 'u_891451', 'u_892081', 'u_892227', 'u_893136', 'u_893431', 'u_893625', 'u_894194', 'u_895922', 'u_896222', 'u_896461', 'u_896760', 'u_897087', 'u_897976', 'u_898066', 'u_898080', 'u_899280', 'u_899469', 'u_899901', 'u_900444', 'u_900813', 'u_901776', 'u_902339', 'u_902373', 'u_902598', 'u_902831', 'u_903110', 'u_903408', 'u_903917', 'u_904104', 'u_904941', 'u_905176', 'u_906239', 'u_907125', 'u_907579', 'u_907772', 'u_908609', 'u_908868', 'u_909607', 'u_910386', 'u_911065', 'u_911477', 'u_911786', 'u_912512', 'u_912967', 'u_914597', 'u_914957', 'u_915212', 'u_915241', 'u_916131', 'u_916644', 'u_917587', 'u_918334', 'r_2443', 'a_1169', 't_0', 't_17', 't_41', 't_43', 't_48', 't_54', 't_96', 't_113', 't_119', 't_146', 't_147', 't_151', 't_157', 't_168', 't_170', 't_178', 't_183', 't_190', 't_203', 't_208', 't_264', 't_323', 't_411', 't_674', 't_1419', 't_1426', 't_1427', 't_1444', 't_1463', 't_1464', 't_3303', 't_3315', 't_3755', 't_4038', 't_4039', 't_4040', 't_4971', 't_4973', 't_5739', 't_5774', 't_6149', 't_6364', 't_6432', 't_7463', 't_7526', 't_7543', 't_7550', 't_8304', 't_8342', 't_8454', 't_9422', 't_9423', 't_10311', 't_10440', 't_12571', 't_12575', 't_12645', 't_12651', 't_12653', 't_13887', 't_15928', 't_16880', 't_17021', 't_17023', 't_17026', 't_17037', 't_17390', 't_17612', 't_19949', 't_20092', 't_22886', 't_27853', 't_34292', 't_37647', 't_38877', 't_46767', 't_50328', 't_56800', 't_58802', 't_59848', 't_61058', 't_65167', 't_65476', 't_67994', 't_67995', 't_67996', 't_67997', 't_67998', 't_67999', 't_68000', 't_68001', 't_68002', 't_68003', 't_68004', 't_68005', 't_68006', 't_68007', 't_68008', 't_68009', 't_68010']\n"]}]},{"cell_type":"code","metadata":{"trusted":true,"collapsed":true,"id":"--KXIpq0dgRG","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1631003162442,"user_tz":-120,"elapsed":8310,"user":{"displayName":"Marco Postiglione","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GgH4oMfyAUOoZeTaaDGC3Vi_LS5mtbEoPeSRbcTpg=s64","userId":"12968427818961586378"}},"outputId":"f2dbcb9d-8afc-43f8-f5f0-6ea9246be825"},"source":["# save hyperedges and nodes\n","\n","print(\"Salvataggio dati hyperedge e nodi...\\n\")\n","\n","print(\"Numero di hyperedge: \" + str(len(hyperedges)))\n","pickle.dump(hyperedges, open('drive/MyDrive/TESI MIRKO/hyperedges.p', 'wb'))\n","print(\"hyperedges.p salvato.\\n\")\n","    \n","print(\"Numero di nodi: \" + str(len(vertexMemberships)))\n","pickle.dump(vertexMemberships, open('drive/MyDrive/TESI MIRKO/vertexMemberships.p', 'wb'))\n","print(\"vertexMemberships.p salvato.\\n\")\n","    \n","print(\"Salvataggio dati hyperedge e nodi completato.\")"],"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Salvataggio dati hyperedge e nodi...\n","\n","Numero di hyperedge: 1049431\n","hyperedges.p salvato.\n","\n","Numero di nodi: 1060311\n","vertexMemberships.p salvato.\n","\n","Salvataggio dati hyperedge e nodi completato.\n"]}]},{"cell_type":"code","metadata":{"id":"mLvBvrPvARZN"},"source":["hyperedges = pickle.load(open('drive/MyDrive/TESI MIRKO/hyperedges.p', 'rb'))\n","vertexMemberships = pickle.load(open('drive/MyDrive/TESI MIRKO/vertexMemberships.p', 'rb'))"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"PZtRMK2pdgRH"},"source":["# Compute random walks (SaT e TaS)"]},{"cell_type":"code","metadata":{"trusted":true,"id":"rwmg_-sqdgRH"},"source":["# SubsampleAndTraverse: definisce random walk tra vertici\n","def SubsampleAndTraverse(length, num_walks, hyperedges, vertexMemberships, alpha=1., beta=0):\n","    walksSAT = []\n","    for vertex in vertexMemberships:\n","        hyperedge_index = random.choice(vertexMemberships[vertex])\n","        hyperedge = hyperedges[hyperedge_index]\n","        walk_vertex = []\n","        curr_vertex = vertex\n","        for _ in range(num_walks):\n","            initial=True\n","            hyperedge_num = hyperedge_index\n","            curr_hyperedge = hyperedge\n","            for i in range(length):\n","                proba = (float(alpha)/len(curr_hyperedge[\"members\"])) + beta\n","                if random.random()<proba:\n","                    adjacent_hyperedges = vertexMemberships[curr_vertex]\n","                    hyperedge_num = random.choice(adjacent_hyperedges)\n","                    curr_hyperedge = hyperedges[hyperedge_num]\n","                walk_vertex.append(str(curr_vertex))\n","                next_nodes = curr_hyperedge[\"members\"][:]\n","                if curr_vertex in next_nodes: next_nodes.remove(curr_vertex)\n","                curr_vertex = random.choice(next_nodes)\n","            walksSAT.append(walk_vertex)    \n","        if (len(walksSAT) % 100000)==0:\n","            print(str(len(walksSAT)*100/(num_walks*len(vertexMemberships)))+\"%\")\n","    return walksSAT"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"fgvc3N5LdgRI"},"source":["walksSAT = SubsampleAndTraverse(length=100,num_walks=10, hyperedges=hyperedges, vertexMemberships=vertexMemberships, alpha=1, beta=0)\n","# walksSAT = pickle.load(open('drive/MyDrive/TESI MIRKO/walksSAT.p', 'rb'))"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"id":"7YY6_M-5klmw"},"source":["delta = int(10603110 / 50)\n","for i in range(0,10603110,delta):\n","    print(i)\n","    if i + delta < 10603110:\n","        filename = \"walksSAT-\" + str(i) + \"-\" + str(i+delta)\n","        pickle.dump(walksSAT[i:i+delta], open(\"drive/MyDrive/TESI MIRKO/walksSAT/\" + filename, \"wb\"))\n","    else:\n","        filename = \"walksSAT-\" + str(i) + \"-\" + str(10603110)\n","        pickle.dump(walksSAT[i:], open(\"drive/MyDrive/TESI MIRKO/walksSAT/\" + filename, \"wb\"))"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"id":"MXXf4gwhMGEw"},"source":["import os\n","import json\n","import pickle\n","\n","prova = os.listdir('drive/MyDrive/TESI MIRKO/walksSAT')[1]\n","\n","f = open('drive/MyDrive/TESI MIRKO/walksSAT/' + prova, 'rb')\n","lista = pickle.load(f)\n","f.close()\n","\n","f = open(\"drive/MyDrive/TESI MIRKO/walksSAT/prova.json\", 'w')\n","json.dump(lista, f) \n","f.close()\n","with  as f:\n","  with  as f2:\n","    "],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"id":"9FPPUErA_DAm"},"source":["import os\n","import gc\n","\n","walksSAT = []\n","for f in os.listdir('drive/MyDrive/TESI MIRKO/walksSAT'):\n","    pikd = open('drive/MyDrive/TESI MIRKO/walksSAT/' + f, 'rb')\n","    for el in pickle.load(pikd):\n","      walksSAT.append(el)\n","    pikd.close()"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"id":"oJ9StrRlyQCo"},"source":["import os\n","\n","walksSAT = []\n","for ws in os.listdir('drive/MyDrive/TESI MIRKO/walksSAT'):\n","    walksSAT.append(pickle.load(open('drive/MyDrive/TESI MIRKO/walksSAT/' + ws, 'rb')))"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"bbS_8JT6dgRJ"},"source":["# salvataggio dati SaT\n","print(\"Salvataggio dati SaT...\")\n","pickle.dump(walksSAT, open('drive/MyDrive/TESI MIRKO/walksSAT.p', 'wb'))\n","print(\"walksSAT.p salvato.\\n\")"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"id":"Bx11PZ0309_L"},"source":["import os\n","import pickle\n","\n","files = os.listdir('drive/MyDrive/TESI MIRKO/walksSAT')\n","\n","aggregated = pickle.load(open('drive/MyDrive/TESI MIRKO/walksSAT/' + files[0], 'rb'))\n","pickle.dump(aggregated, open('drive/MyDrive/TESI MIRKO/walksSAT.p', 'wb'))\n","os.remove('drive/MyDrive/TESI MIRKO/walksSAT/' + files[0])\n","\n","for f in files[1:]:\n","    print(f)\n","    # aggregated = pickle.load(open('drive/MyDrive/TESI MIRKO/walksSAT.p', 'rb'))\n","    for el in pickle.load(open('drive/MyDrive/TESI MIRKO/walksSAT/' + f, 'rb')):\n","        aggregated.append(el)\n","    pickle.dump(aggregated, open('drive/MyDrive/TESI MIRKO/walksSAT.p', 'wb'))\n","    os.remove('drive/MyDrive/TESI MIRKO/walksSAT/' + f)"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"SCoSsHy5dgRK"},"source":["# Generate context embeddings"]},{"cell_type":"code","metadata":{"trusted":true,"id":"OK605zLtdgRK"},"source":["from gensim.models.word2vec import Word2Vec\n","from gensim.models.poincare import PoincareModel, PoincareRelations\n","from gensim.models.callbacks import CallbackAny2Vec\n","import time as time\n","\n","def EmbedWord2Vec(walks,dimension):\n","    time_start = time.time()\n","    print(\"Creating embeddings.\")\n","    model = Word2Vec(walks, size=dimension, window=5, min_count=0, sg=1, workers=16, iter=20)\n","    node_ids = model.wv.index2word\n","    node_embeddings = model.wv.vectors\n","    print(\"Embedding generation runtime: \", time.time()-time_start)\n","    return node_ids, node_embeddings"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"G5xrj5SkdgRL"},"source":["vertex_embedding_dimension = 200"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"QwfPa45u1Dz8","executionInfo":{"status":"ok","timestamp":1630608376428,"user_tz":-120,"elapsed":59407,"user":{"displayName":"Marco Postiglione","photoUrl":"","userId":"08268241117879226583"}},"outputId":"1fdd19be-d74d-4b24-96ca-5ba6f133c7f4"},"source":["import gc\n","gc.collect()"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/plain":["725"]},"metadata":{},"execution_count":26}]},{"cell_type":"code","metadata":{"trusted":true,"id":"hpSmbjxedgRL","colab":{"base_uri":"https://localhost:8080/"},"outputId":"24a9a6aa-6ff6-4964-d048-ec40c5edf4d5"},"source":["# creazione embeddings dei nodi\n","print(datetime.datetime.now())\n","print(\"Creazione vertex embeddings...\")\n","vertex_ids, vertex_embeddings = EmbedWord2Vec(walks=walksSAT, dimension=vertex_embedding_dimension)\n","print(datetime.datetime.now())\n","print(\"Vertex embeddings completati. (\"+str(len(vertex_embeddings))+\" embeddings)\")"],"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["2021-09-02 18:46:26.757239\n","Creazione vertex embeddings...\n","Creating embeddings.\n"]}]},{"cell_type":"code","metadata":{"trusted":true,"id":"44ecXbbpdgRL"},"source":["print(\"Context embedding per nodo \"+vertex_ids[0]+\":\")\n","print(vertex_embeddings[0])"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"mGuyIvEPdgRM"},"source":["context_embeddings = dict(zip(vertex_ids, vertex_embeddings))\n","print(context_embeddings['SOAUWYT12A81C206F1'])"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"E7X6FgYEdgRM"},"source":["# salvataggio vertex embeddings\n","print(\"Salvataggio context embeddings...\")\n","pickle.dump(context_embeddings, open('drive/MyDrive/TESI MIRKO/context_embeddings.p', 'wb'))\n","print(\"context_embeddings.p salvato.\\n\")"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"JWEm532hdgRM"},"source":["# Mood detection (compute arousal e valence per user)"]},{"cell_type":"code","metadata":{"trusted":true,"id":"fd-sxBXsdgRN"},"source":["# get arousal e valence foreach song listened by each user_id\n","\n","user_data[\"arousal\"] = user_data.merge(song_data, on=\"song_id\", how=\"left\").set_index(\"triple_id\")[\"arousal\"]\n","user_data[\"valence\"] = user_data.merge(song_data, on=\"song_id\", how=\"left\").set_index(\"triple_id\")[\"valence\"]"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"6aCIeXLedgRN"},"source":["print(user_data[user_data[\"user_id\"]==\"u_60\"])"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"Ln8S-w0idgRN"},"source":["# compute arousal e valence for each user as average of each listend song (weighted on play_count)\n","\n","user_data['weighted_arousal'] = user_data['arousal'] * user_data['play_count']\n","user_data['weighted_valence'] = user_data['valence'] * user_data['play_count']\n","\n","user_mood = user_data.groupby('user_id').agg({'weighted_arousal': 'sum', 'weighted_valence':'sum', 'play_count':'sum'}).reset_index()\n","user_mood[\"arousal\"] = user_mood[\"weighted_arousal\"]/user_mood[\"play_count\"]\n","user_mood[\"valence\"] = user_mood[\"weighted_valence\"]/user_mood[\"play_count\"]\n","\n","print(user_mood)"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"amUmdQPbdgRO"},"source":["print(user_mood[user_mood['user_id']=='u_0'][['user_id','arousal','valence']])"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"C4L6uYJ2dgRO"},"source":["# load max per feature of each song of each user for max pooling\n","\n","user_max = user_data.groupby('user_id').agg({'arousal':'max', 'valence':'max'}).reset_index()\n","user_mood[\"arousal\"] = user_mood[\"arousal\"] + user_max[\"arousal\"]\n","user_mood[\"valence\"] = user_mood[\"valence\"] + user_max[\"valence\"]"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"rLTaRFb3dgRO"},"source":["user_mood.head()"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"3MO37a7IdgRP"},"source":["# compute dict with valence and arousal of song and user\n","\n","arousal_valence_dict = {}\n","\n","def generate_arousal_valence_dict(row):\n","    if arousal_valence_dict.get(row[0]) is None:\n","        arousal_valence_dict[row[0]] = {}\n","    arousal_valence_dict[row[0]][\"valence\"] = row[1]\n","    arousal_valence_dict[row[0]][\"arousal\"] = row[2]\n","\n","user_mood[[\"user_id\", \"valence\", \"arousal\"]].progress_apply(generate_arousal_valence_dict, axis=1)\n","\n","song_data[[\"song_id\", \"valence\", \"arousal\"]].progress_apply(generate_arousal_valence_dict, axis=1)"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"hJikrsuidgRP"},"source":["# sove valence e arousal\n","print(\"Salvataggio valence e arousal...\")\n","pickle.dump(arousal_valence_dict, open('arousal_valence_dict.p', 'wb'))\n","print(\"arousal_valence_dict.p salvato.\\n\")"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"NC9FvtdDdgRV"},"source":["# COncatenate features"]},{"cell_type":"code","metadata":{"trusted":true,"id":"qYflxMWXdgRW"},"source":["import numpy as np\n","\n","def generate_embeddings(row, e_dict):\n","    embedding = np.concatenate((context_embeddings[row[0]], content_embeddings[row[0]]))\n","    embedding = np.append(embedding,arousal_valence_dict[row[0]][\"arousal\"])\n","    embedding = np.append(embedding,arousal_valence_dict[row[0]][\"valence\"])\n","    e_dict[row[0]] = embedding"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"aJv2zcr2dgRW"},"source":["# creo embedding canzoni\n","song_embeddings = {}\n","song_data[[\"song_id\"]].apply(lambda x: generate_embeddings(x, song_embeddings), axis=1)\n","\n","print(\"Creati \"+str(len(song_embeddings))+\" song embedding.\")\n","print(song_embeddings[\"SOZOBWN12A8C130999\"])"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"n_-CxIfHdgRW"},"source":["# creo embedding utenti\n","user_embeddings = {}\n","user_hyperedges[[\"user_id\"]].progress_apply(lambda x: generate_embeddings(x, user_embeddings), axis=1)\n","\n","print(\"Creati \"+str(len(user_embeddings))+\" user embedding.\")"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"xrg6W6G0dgRX"},"source":["# salvataggio song embeddings\n","print(\"Salvataggio song embeddings...\")\n","pickle.dump(song_embeddings, open('song_embeddings.p', 'wb'))\n","print(\"song_embeddings.p salvato.\\n\")\n","\n","# salvataggio user embeddings\n","print(\"Salvataggio user embeddings...\")\n","pickle.dump(user_embeddings, open('user_embeddings.p', 'wb'))\n","print(\"user_embeddings.p salvato.\\n\")"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"Pn81iQy1dgRX"},"source":["# Normalizzazione embeddings (Z-Score)"]},{"cell_type":"code","metadata":{"trusted":true,"id":"_B0gWpiSdgRX"},"source":["import numpy as np\n","from scipy.stats import zscore\n","\n","song_keys, song_vals = zip(*song_embeddings.items())\n","song_embeddings = dict(zip(song_keys, zscore(song_vals, ddof=1)))\n","\n","user_keys, user_vals = zip(*user_embeddings.items())\n","user_embeddings = dict(zip(user_keys, zscore(user_vals, ddof=1)))"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"vD_teCjRdgRY"},"source":["# salvataggio song embeddings con z-score\n","print(\"Salvataggio song embeddings...\")\n","pickle.dump(song_embeddings, open('song_embeddings_zscore.p', 'wb'))\n","print(\"song_embeddings_zscore.p salvato.\\n\")\n","\n","# salvataggio user embeddings con z-score\n","print(\"Salvataggio user embeddings...\")\n","pickle.dump(user_embeddings, open('user_embeddings_zscore.p', 'wb'))\n","print(\"user_embeddings_zscore.p salvato.\\n\")"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"Vk_xT6O2dgRY"},"source":["# Recommendation system (distanza coseno pesata)"]},{"cell_type":"code","metadata":{"trusted":true,"id":"tr7N1mEidgRY"},"source":["from numpy import dot\n","from numpy.linalg import norm\n","from scipy import spatial\n","from sklearn.metrics.pairwise import cosine_similarity\n","pd.options.display.max_rows = None"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"YQzEu3padgRZ"},"source":["# cos sim\n","\n","def cos_sim(a, b, w):\n","    return 1-spatial.distance.cosine(a, b, w)\n","    #return dot(a, b)/(norm(a)*norm(b))"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"N23W_0okdgRZ"},"source":["# weights vector\n","w_1 = np.full(16, 1/(16*3))  # peso context-embedding\n","w_2 = np.full(25, 1/(25*3))  # peso content-embedding\n","w_3 = np.full(2, 1/(2*3))    # peso arousal e valence\n","\n","# vettore peso w (stesso peso ad ogni sistema)\n","w_equi = np.concatenate((w_1, w_2, w_3), axis=None)\n","\n","# vettore peso w_context (solo context-based)\n","w_context = np.concatenate((np.ones(200), np.zeros(25), np.zeros(2)), axis=None)\n","\n","# vettore peso w_content (solo context-based)\n","w_content = np.concatenate((np.zeros(16), np.ones(50), np.zeros(2)), axis=None)\n","\n","# vettore peso w_av (solo context-based)\n","w_av = np.concatenate((np.zeros(16), np.zeros(25), np.ones(2)), axis=None)"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"2Cs7FpBEdgRa"},"source":["w_1_mix = np.full(16, 5/(16*3))  # peso context-embedding\n","w_2_mix = np.full(100, 1/(50*3))  # peso content-embedding\n","w_3_mix = np.full(2, 0/(2*3))    # peso arousal e valence\n","w_mix = np.concatenate((w_1_mix, w_2_mix, w_3_mix), axis=None)"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"6uQbJP0jdgRb"},"source":["# remove 0 lisetnings\n","\n","listened_songs = user_data_total[\"song_id\"].drop_duplicates()\n","song_data_listened = song_data[song_data[\"song_id\"].isin(listened_songs)].reset_index()\n","\n","# use song unique id for matrix \n","song_data_listened[\"id\"] = song_data_listened.index\n","user_data_total[\"song_matrix_id\"] = user_data_total.merge(song_data_listened, left_on=\"song_id\", right_on=\"song_id\", how=\"left\")[\"id\"]"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"09JWYZ-mdgRc"},"source":["# caricamento dati set (per utenti su cui fare la predizione)\n","\n","#  test set\n","user_test = user_data_total[user_data_total[\"set\"]==\"test\"]\n","user_test = user_test.merge(user_hyperedges, on=\"user\", how=\"left\").set_index(user_test.columns.values[0])[[\"user\",\"user_id\",\"user_id_matrix\",\"song_id\",\"play_count\",\"triple_id\",\"set\",'song_matrix_id']]\n","users_test_songs = user_test.groupby('user_id_matrix')['song_matrix_id'].apply(list).reset_index(name = \"songs\")\n","\n","# training degli utenti nel test set\n","user_training = user_data_total[user_data_total[\"set\"]==\"train\"]\n","user_training = user_training.merge(user_hyperedges, on=\"user\", how=\"left\").set_index(user_training.columns.values[0])[[\"user\",\"user_id\",\"user_id_matrix\",\"song_id\",\"play_count\",\"triple_id\",\"set\",'song_matrix_id']]\n","user_training = user_training[user_training[\"user_id_matrix\"].isin(users_test_songs[\"user_id_matrix\"])]\n","users_training_songs = user_training.groupby('user_id_matrix')['song_matrix_id'].apply(list).reset_index(name = \"songs\")\n","\n","#test_user_list = user_test.user_id.unique()\n","#test_song_list = user_test.song_id.unique()\n","#print(user_training)\n","#print(user_test)\n","#print(users_test_songs)"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"_2NFBhBndgRc"},"source":["# compute matrix user/song test set\n","users_test_matrix = users_test_songs['songs'].tolist()\n","\n","import scipy.sparse as sp\n","\n","matrix = sp.lil_matrix((len(users_test_matrix),len(song_data_listened)), dtype=int)\n","for row in range(len(users_test_matrix)):\n","    for column in users_test_matrix[row]:\n","        matrix[row, column] = 1\n","        \n","users_test_matrix = matrix"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"oKb7E_6NdgRd"},"source":["# compute matrix user/song (only test set users)\n","users_train_matrix = users_training_songs['songs'].tolist()\n","\n","import scipy.sparse as sp\n","\n","matrix = sp.lil_matrix((len(users_train_matrix),len(song_data_listened)), dtype=int)\n","for row in range(len(users_train_matrix)):\n","    for column in users_train_matrix[row]:\n","        matrix[row, column] = 1\n","\n","users_train_matrix = matrix"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"JzCu7gVGdgRd"},"source":["# user_embeddings_to_array\n","user_hyperedges['embedding'] = user_hyperedges.user_id.map(user_embeddings)\n","users_test_songs['user_embedding'] = users_test_songs.merge(user_hyperedges, on=\"user_id_matrix\", how=\"left\")[\"embedding\"]\n","user_embeddings_array = users_test_songs['user_embedding'].tolist()\n","user_embeddings_array = np.array(user_embeddings_array)"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"PSgaQY6zdgRe"},"source":["# song_embeddings to array\n","song_data_listened['embedding'] = song_data_listened.song_id.map(song_embeddings)\n","song_embeddings_array = song_data_listened['embedding'].tolist()\n","song_embeddings_array = np.array(song_embeddings_array)"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"yH8j0CrddgRf"},"source":["# compute scores and top-k prediction for each user\n","\n","def compute_score_matrix(user_embeddings_array, song_embeddings_array, w):\n","    num = (user_embeddings_array * w) @ song_embeddings_array.T\n","    norms_user = ((user_embeddings_array * w) * user_embeddings_array).sum(1, keepdims=True)**.5\n","    norms_song = ((song_embeddings_array * w) * song_embeddings_array).sum(1, keepdims=True)**.5\n","    den = norms_user @ norms_song.T\n","    users_score_matrix = num / den\n","    return users_score_matrix\n","\n","print(str(datetime.datetime.now())+\" - Start\")\n","\n","i = 0\n","k = 100\n","step = 10000\n","users_predictions = np.zeros((len(user_embeddings_array), k), dtype=int)\n","\n","while(i<len(user_embeddings_array)):\n","    \n","    j = min(i+step, len(user_embeddings_array))\n","    \n","    # calcola score\n","    print(str(datetime.datetime.now())+\" - Calcolo scores \"+str(i)+\"-\"+str(j))\n","    users_score_matrix = compute_score_matrix(user_embeddings_array[i:j], song_embeddings_array, w_context)\n","    \n","    # calcola top k suggestions\n","    print(str(datetime.datetime.now())+\" - Rimuovo canzoni di training \"+str(i)+\"-\"+str(j))\n","    users_score_matrix = users_score_matrix - users_train_matrix[i:j]*2 # peggioro lo score delle canzoni di train per non predirle\n","    print(str(datetime.datetime.now())+\" - Calcolo top k suggestions con argsort \"+str(i)+\"-\"+str(j))        \n","    users_predictions[i:j] = np.argsort(-users_score_matrix)[:,0:k]\n","    #print(str(datetime.datetime.now())+\" - Calcolo top k suggestions con argpartition \"+str(i)+\"-\"+str(j))          \n","    #users_predictions[i:j] = np.argpartition(-users_score_matrix, range(k))[:,0:k] # ordino in base allo score e restituisco le prime k\n","\n","    i = j\n","\n","print(str(datetime.datetime.now())+\" - Fine\")\n","    \n","    \n","    #top_k_songs = np.argpartition(users_score_matrix, -k)[:,-k:]\n","    #for top in range(0,k):\n","    #    print(top_k_songs[:,top].flatten())\n","    #    users_pred_matrix[i:(i+u), top_k_songs[:,top].flatten()] = 1\n","    #print(top_k_songs[0])\n","    #for u in range(0, step):\n","        #users_score_matrix[u,users_train_matrix[i+u]] = -1     # dai score minimo alle canzoni di test (per non predirle)\n","        #top_k_songs = np.argsort(users_score_matrix[u])[0:k]   # ottieni le top k canzoni con score migliore\n","        #users_pred_matrix[i+u,top_k_songs] = 1                 # segnale nella matrice di predizione\n","        #if u%100==0: print(u)"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"7S_i621KdgRg"},"source":["# calcolo predictions per un utente\n","user_id = random.randint(0, users_predictions.shape[0]-1)\n","print(user_id)"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"VTuY4QJkdgRg"},"source":["# canzoni ascoltate dall'utente\n","song_data_listened[song_data_listened.id.isin(users_train_matrix.rows[user_id])]"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"x_qi2ZoDdgRg"},"source":["# top 100 consigli per l'utente\n","predictions_df = pd.DataFrame({'id':users_predictions[user_id]})\n","predictions_df[\"rank\"]= predictions_df.index+1\n","predictions_df.merge(song_data_listened, on='id', how='left').set_index('rank')"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"trusted":true,"id":"NlA6Gp5bdgRh"},"source":["# canzoni del test set dell'utente\n","song_data_listened[song_data_listened['id'].isin(users_test_matrix.rows[user_id])]"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"oGOtZ5indgRh"},"source":["# Evaluation"]},{"cell_type":"markdown","metadata":{"id":"qZ5h-da2dgRh"},"source":["**Recall e AP**"]},{"cell_type":"code","metadata":{"trusted":true,"id":"8vFKmlyBdgRi"},"source":["def check_true_positives(songs_test, top_songs):\n","    \n","    # controlla quante canzoni del test set compaiono\n","    found = 0\n","    for test_song in songs_test:\n","        if test_song in top_songs:\n","            found += 1\n","    return found\n","\n","def AP (songs_test, top_songs):\n","    \n","    # average precision\n","    found = 0\n","    score = 0\n","    for i in range(len(songs_test)):\n","        if songs_test[i] in top_songs:\n","            found += 1\n","            score += found/(i+1)\n","    return score/min(len(songs_test), len(top_songs))"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"c17t3gtg3qsB","executionInfo":{"status":"ok","timestamp":1630743321316,"user_tz":-120,"elapsed":10,"user":{"displayName":"Marco Postiglione","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GgH4oMfyAUOoZeTaaDGC3Vi_LS5mtbEoPeSRbcTpg=s64","userId":"12968427818961586378"}},"outputId":"2860bf6e-3830-4cfa-9b7c-84ddfbcc826e"},"source":["users_test_matrix.shape"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/plain":["(380906, 10880)"]},"metadata":{},"execution_count":31}]},{"cell_type":"code","metadata":{"trusted":true,"id":"PVWDfvq9dgRi"},"source":["# compute recall and AP @100/50/20/10/5\n","print(str(datetime.datetime.now())+\" - Start evaluation\")\n","\n","for k in [100, 50, 20, 10, 5]:\n","    \n","    true_positives = np.zeros(users_test_matrix.shape[0])\n","    user_recalls = np.zeros(users_test_matrix.shape[0])\n","    user_APS = np.zeros(users_test_matrix.shape[0])\n","    test_songs_n = 0\n","\n","    for i in range(users_test_matrix.shape[0]):\n","\n","        test_songs = users_test_matrix.rows[i]\n","        test_songs_n += len(test_songs)\n","        predictions = users_predictions[i]\n","\n","        true_positives[i] = check_true_positives(test_songs, predictions[0:k])\n","\n","        user_recalls[i] = float(true_positives[i]/(len(test_songs))) \n","\n","        user_APS[i] = AP(test_songs, predictions[0:k])\n","\n","        #print(\"[\"+str(i)+\"]: \"+str(user_recalls[i]*100)+\"%\")\n","\n","    macro_recall = np.mean(user_recalls)\n","    print(\"Macro-avg Recall@\"+str(k)+\" (per utente): \"+str(macro_recall*100)+\"%\")\n","    #micro_recall = np.sum(true_positives)/test_songs_n\n","    #print(\"Micro-avg Recall@\"+str(k)+\" (per canzone): \"+str(micro_recall*100)+\"%\")\n","    avg_ap = np.mean(user_APS)\n","    print(\"AP@\"+str(k)+\": \"+str(avg_ap*100)+\"%\")\n","\n","print(str(datetime.datetime.now())+\" - End evaluation\")"],"execution_count":null,"outputs":[]}]}